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

Notifications

Announcements

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 135

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
    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
    135 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
    on at

    Hi @tjestesjr ,

     

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

     

    Best regards,

  • tjestesjr Profile Picture
    135 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard