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 Apps / Power Automate Excel t...
Power Apps
Answered

Power Automate Excel to SQL Server

(0) ShareShare
ReportReport
Posted on by 145

Hi,

 

I am trying to create a flow from a canvas app that lets users upload a file of their choosing. This file is saved to a SharePoint Site and is then supposed to be loaded to a SQL table. Because the table is loaded "dynmically" the column names from the Excel table are not showing up as dynamic content. So, my question is how to reference the columns from the Excel table? I have tried using 

items('Apply_to_each')['Supplier Name'] but it only puts the literal string in the database. My other issue is that the file has ~400 rows and I am only getting 1 entry in the database. Do I need the "SQL Insert Rows" outside of the For Each loop or does it need to be in a separate "Fore Each Loop"?

 

PA_Flow_1.gif

PA_Flow_2.gif

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @tjestesjr ,

     

    First you need another Apply to each below List rows action, inside this Apply to each control, use the insert row to SQL table action. 

     

    Second, you need to write expressions for each field, select add dynamic content then choose expression and write in formula bar. I assume Apply to each 2 is the new control added that include the insert row action, then the expressions will be similar to:

    items('Apply_to_each_2')?['Supplier Name']

    vjefferni_0-1689670340089.png

     

    Best regards,

  • tjestesjr Profile Picture
    145 on at

    I have embedded another Apply to Each and that functionality works. I used the function items('Apply_to_each_2')?['Supplier Name'] in the supplier column but I am still getting it as a literal string in the data bases (see below)

    PA_Flow_3.gif

    tjestesjr_0-1689688000858.png

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @tjestesjr ,

     

    It's expression, need to write in the same way as ImportDate field.

     

    Best regards,

  • tjestesjr Profile Picture
    145 on at

    I understand now and was able to import the Supplier Name, thank you very much.

     

    tjestesjr_11-1689768842695.png

     

     
    I am trying to import the next column now but I am getting an error on the expression: items('Apply_to_each_2')?['Wendy's Eng_x002e_ Prefix']

    tjestesjr_12-1689769058757.png

    I got the column name from the raw JSON produced by the "List Rows" step.

     

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 Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard