Can anyone share an example of a Logic App which creates an Excel or CSV file(s) from multiple SQL queries?

Helen Bucksey 21 Reputation points

I have successfully created a very simple Logic App that creates a single CSV from a SQL query and sends the CSV by email:
Ideally I would like to have a single Logic App that creates three sheets in a single Excel file from three separate SQL queries, and sends the Excel by email. Alternatively if I could have a single Logic App that creates three separate CSVs from three separate SQL queries and sends all three CSVs by email that would be fine too.
I have looked for examples but wasn't able to find one that I could adapt for this purpose. Could anyone help me out with an example please?
Many thanks,

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
1,958 questions
No comments
{count} votes

Accepted answer
  1. Pramod Valavala 14,636 Reputation points Microsoft Employee

    @Helen Bucksey One way to achieve this would be to use the Excel Connector to create the worksheets, tables, columns, and rows required but this would be verbose considering you would have to loop over all the CSV data. Another way would be to send the CSV files to an Azure Function that could perform the merge with code.

    But if the CSV files would do, you could just perform separate SQL queries and create CSV tables for each. You could even run them in parallel.

0 additional answers

Sort by: Newest