Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 9hR+eOrdap8Ib30kvPIGHx
Power Automate - Building Flows
Answered

Flow For Importing Entire Excel Worksheet into SQL Server?

Like (0) ShareShare
ReportReport
Posted on 19 Aug 2022 22:38:12 by 11

Hi,

 

My goal is to create a Power Automate Flow that will allow me to retrieve a file (In my case from SharePoint) and enter the entire worksheet(s) into a SQL Server Table. I have already created the table in SQL to match the column headers and datatypes of my Excel sheet. My question is this: I have seen other posts for "List rows present in a table" and this will not work for me because I do not have a table setup within my sheet, just raw data, and therefore I cannot programmatically reference the table in my flow. If there is an option to import a CSV using Power Automate this would also be fine as I have a staging table and then cast those values to production tables with my necessary datatypes. 

 

Thanks!

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 22 Aug 2022 at 01:00:26
    Re: Flow For Importing Entire Excel Worksheet into SQL Server?

    @JBR15 

    That’s awesome, glad I could help!

  • JBR15 Profile Picture
    11 on 22 Aug 2022 at 00:56:44
    Re: Flow For Importing Entire Excel Worksheet into SQL Server?

    @takolota 

     

    I want to sincerely thank you for your help. In watching the video on that link, I came across your channel and saw the "Automate Reports From External Datasource" video and it perfectly fits my needs, I seriously can't thank you enough.

     

     

  • Verified answer
    takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 19 Aug 2022 at 23:16:46
    Re: Flow For Importing Entire Excel Worksheet into SQL Server?

    @JBR15 


    Yes you can get the contents of a CSV file on OneDrive or SharePoint & transform that for SQL queries. If the file contents don’t come through as text, then you can usually use a base64tostring( ) expression on the contents to get it into text.

     

    How big are your worksheets? How many rows?


    If it is just a few, then I have something you can use to get CSV data into JSON dynamic content that you can use in a regular SQL action in a loop.

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/CSV-to-Dataset/td-p/1508191

     

    EDIT: Here is a link to the template flow page where the author eventually got something to help with his external site report download to SQL request: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Automate-Reports-From-External-Datasources/td-p/1486023

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 81

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard
Loading started