Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

How to use data from sql server to build a excel?

Posted on by

Hi All,

I have made an automate to get data from sql server, and it returns a table. Then how can I use this table to build a excel and put it on the sharepoint?

  • lbendlin Profile Picture
    lbendlin 7,748 on at
    Re: How to use data from sql server to build a excel?

    The Graph API is for the "write to Excel"  part.  To download data from an SQL source you can use a standard connector.

  • Re: How to use data from sql server to build a excel?

    In fact, I need to click a button in a powerapp to download data from sql server, did the Graph API work in the powerapp?

  • Re: How to use data from sql server to build a excel?

    Hi , @Anonymous 

    If you want to rename the created file name , you can just modify the fileName in the create file action:

    vyueyunmsft_0-1704337728536.png

    If you want to rename the worksheet name , you may need to use the office script, for this , you can refer to :
    Solved: Rename excel worksheet from script - Power Platform Community (microsoft.com)

     

    If this reply can help you , you can click mark this reply as solution, thanks in advance!


    Best Regards,

    Yueyun Zhang

     

  • lbendlin Profile Picture
    lbendlin 7,748 on at
    Re: How to use data from sql server to build a excel?

    my recommendation would be to use the Graph API. 

     

    Write data to an Excel workbook - Microsoft Graph | Microsoft Learn

  • Re: How to use data from sql server to build a excel?

    Both are acceptable, and I also want to rename the sheet name (A fixed name).

    what I want to do is, each time use this automate, I can get a new excel file in sharepoint.

    Sum up, I want to get data from sql server and put them into an excel in sharepoint so that I can download it

  • Re: How to use data from sql server to build a excel?

    Both are acceptable, and I also want to rename the sheet name (A fixed name).

    what I want to do is, each time use this automate, I can get a new excel file in sharepoint.

    Sum up, I want to get data from sql server and put them into an excel in sharepoint so that I can download it

  • Re: How to use data from sql server to build a excel?

    Hi , @Anonymous 

    According to your description, you have got an array from sql server in Power Automate.

    If you want to export to Excel dynamically, you can follow this video to create the flow. You need first create a blank Template Excel file.
    Power Automate Export to Excel | Dynamically create Table, Columns & Add Rows to Excel | Send Email - YouTube

     

    If this reply can help you , you can click mark this reply as solution, thanks in advance!


    Best Regards,

    Yueyun Zhang

  • lbendlin Profile Picture
    lbendlin 7,748 on at
    Re: How to use data from sql server to build a excel?

    Do you want to start from an Excel template copy, or from scratch (creating a blank Excel file and creating a table) ?

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,733

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,750

Leaderboard

Featured topics