Skip to main content

Notifications

Power Automate - General Discussion
Answered

When a file is created in Sharepoint, extract column names and update "Yes" in another file if the same column name is present

(0) ShareShare
ReportReport
Posted on by

I need to read an excel file that is created in a SharePoint and, if certain columns are present, return Yes in another excel in a SharePoint for a particular column name. For example, there will be certain column headers (Jul, Aug, Sep) and I need to return "Yes" in another excel if "Jul","Aug","Sep" are present in my other excel sheet where it would contain Jan to Dec as a column names.

Below I have attached a sample excel sheet for my explanation. So, there is no column in the name of Oct and so, so there is no update, but there is Jul, Aug, Sep, so there is yes updated in another excel file.

Kindly help me to create this kind of flow using power automate, so it reads the excel file created in a SharePoint and do the following actions.

kiran1996_0-1663691405064.png

kiran1996_1-1663691449232.png

 

 

  • Re: When a file is created in Sharepoint, extract column names and update "Yes" in another file if the same column name is present

    @v-yujincui-msft 

    Hello,

    In my flow, When the file is created in sub folder "September", the table called "September" is being updated in my excel sheet. But how to modify a flow, if the file is created in folder "2" which contains sub folders of 12 months folder, to identify exactly in which sub folder the file has been created and update the things in that particular sub folder name table in my excel sheet. 

     

    For ex, I would just give details until folder 2 (/DSR joint forecast inpu/DSR inputs/2) and if the file is created in sub folder called "September" inside folder "2", I want to update the details in the excel sheet called "September" which has a table called "September".

     

    In the present flow, I'm giving the table name where it needs to be updated. In this case I need to create 12 flows for 12 months. So how to create a single flow. 

     

    Thanks

     

    kiran1996_0-1666189788990.pngkiran1996_1-1666189808207.pngkiran1996_2-1666189815302.pngkiran1996_3-1666189821026.png

     

  • Verified answer
    Re: When a file is created in Sharepoint, extract column names and update "Yes" in another file if the same column name is present

    Hi @Anonymous ,

     

    We can modify the flow to run when the table name is unknown, but if the table is not created, we need to create a table to easily extract data. When we create the table, we need to manually specify the column names🤣.

    Re: populating List from excel file not yet create... - Power Platform Community (microsoft.com)

    Solved: Create a Worksheet and a table in Excel - Excel Bu... - Power Platform Community (microsoft.com)

    vyujincuimsft_0-1663917083444.png

     

     

    Best Regards,

    Charlie Choi

     

  • Re: When a file is created in Sharepoint, extract column names and update "Yes" in another file if the same column name is present

    Hello @v-yujincui-msft 

    You have my sincere gratitude. Your flow is working.

    However, the flow only use predetermined table names to identify the column headers (in the "List rows present in a table"). Is there a way to identify the column headers for this flow without a table name or without a creation of table?

    I would be more happy if you could solve this as well. Once again Thank you so much for giving me the detailed explanation in the creation of this flow.

  • Verified answer
    Re: When a file is created in Sharepoint, extract column names and update "Yes" in another file if the same column name is present

    Hi @Anonymous ,

     

    I have made a simple test for your reference.

     

    1. Here are my excel files.

    vyujincuimsft_1-1663831574980.png

    2. Here is my Flow.

    split(string(first(outputs('List_rows_present_in_a_table')?['body/value'])),'",')
    split(replace(replace(replace(item(), '"', ''), '}', ''), '{', ''), ':')[0]
    if(contains(body('Join'),'ColumnName'),'Yes','')

    vyujincuimsft_2-1663831590909.png

    vyujincuimsft_3-1663831618120.png

    Result Screenshot:

    vyujincuimsft_4-1663831640553.png

    Here is a link that for your reference.

    https://powerusers.microsoft.com/t5/Building-Flows/Is-there-any-way-to-get-the-column-headers-from-Excel-file-amp/td-p/846453

     

     

    Best Regards,

    Charlie Choi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard