web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Cannot map excel table...
Power Automate
Suggested Answer

Cannot map excel table fields using dynamic file (Create File ID)

(1) ShareShare
ReportReport
Posted on by 74
I am working on a Power Automate flow triggered from a Power BI button, and I’m running into an issue when trying to add data to an Excel template stored in SharePoint.
 
The goal to the flow is:
  • User clicks button in BI report
  • Flow identifies the user by email address
  • Flow navigates to user folder on SharePoint
  • Flow creates a copy of a excel template into the user's folder 
  • Flow add data from BI report into the table
  • Flow renames the file at the end 
When I use Create file to copy the template and then try to use the file ID in Add a row into a table, I am unable to map the columns to the correct fields in the table. The flow will either error out or add a blank row to the template, depending on the expression used in the Row field. When configuring the Add a row into a table step using the ID from Create file, the column fields do not appear—only the generic Row field is available. If I hardcode the file path instead, the column mapping works correctly; however, this creates another issue where the file could be overwritten if the user runs the flow again before it is renamed.
 
I have tried the below, but thing is working.  Do you have a suggestion?  
  • Using ID from Create file

  • Using Get file metadata using path

  • Using List rows present in table before adding rows

  • Building a manual JSON row object (json(concat(...)))

  • Using items() inside Apply to each

  • Using Parse JSON to structure the data

  • Using delays to ensure file availability
Field Inventory Summary Report.png
Field Inventory Summary Report error.png
Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,681 Super User 2026 Season 1 on at
    Don't use ORDERBY in your DAX queries unless you really, really have to.
     
    Consider using the Graph API to transfer the content of the Power BI query results to the Excel table (Remember that everything you get back from Power BI is always an array).  That will allow you to avoid the RBAR, and will elegantly work around the dynamic name issue.
  • KONeill102399 Profile Picture
    74 on at
    Would using a Graph API support a workbook with 2 tabs?  The data I am querying is from two different tables in BI that need to be put into one workbook.  There will be a summary tab and details tab in the workbook.
  • lbendlin Profile Picture
    8,681 Super User 2026 Season 1 on at
  • Suggested answer
    sumit_artesian Profile Picture
    21 on at
     
    This is mainly a syntax error on your end.
     
    When you add the File ID dynamically in Add a row to an excel table action, it does not show you the usual column names which you can map directly, it only shows a "Row" field where you have to pass the data for the entire row.
     
    Now I see you have already done that, but the syntax is sort of wrong. The data must be passed in the form of CSV or a valid JSON. No functions or expressions, just pure JSON or CSV. You can add expressions to dynamically set the values or keys, but the syntax should be a valid JSON or CSV at the end.
     
     
    Here is an example below:
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item.
    If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like! 🩷
  • Suggested answer
    rzaneti Profile Picture
    4,489 Super User 2026 Season 1 on at
     
    As mentioned by @lbendlin, MS Graph API is definitely a solution here. 
     
    Another possibility is to work with Office Scripts, which has similar features of Graph when it comes to manage the Excel document - it works like a VBA, but written in JavaScript, supported by Excel for Web and accessible via Power Automate. 
     
    I'm not sure if your plan for both Excel tabs is to write data into a table or directly in the ranges, so here are some contents that can help you to accomplish it with Office  Scripts:
     
    You can also find some useful Office Script samples at the Office Scripts Gallery.
     
    Let me know if it works for you or if you need any additional help!
     
     If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 569

#2
Valantis Profile Picture

Valantis 484

#3
Vish WR Profile Picture

Vish WR 460

Last 30 days Overall leaderboard