简体   繁体   中英

How do I import results of SQL server select into a new Excel file in Azure Logic Apps?

I've been struggling for a while with this seemingly simple task. I need to create a workflow in Azure Logic Apps that would select some data from a SQL Server Database (that's easy in Logic Apps) and then insert them into an Excel file which I then need to send via e-mail. I haven't been able to find a solution for that yet and would be glad for your help! Thanks!

Logic Apps appear to only support Excel online (OneDrive or O365) directly. Additionally, it seems you can only create a workbook or table inside an existing file.

Since Excel reads CSV, you could create that from the Logic App into Blob Storage. If you really need an XLSX file, you could create an Azure Function on an HTTP trigger that accepts the data payload and generates the Excel file in Blob Storage.

Once the blob is in storage, you should be able to use Logic Apps's "Create SAS Uri by Path" to generate a SAS URI you can then email.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM