0
votes

I have requirement to read data from azure sql server and write in excel blob using data factory. i created csv file from azure sql server using datafactory copy activity. i have no idea how to convert csv to excel or directly read excel from azure sql using data factory. I searched on internet and found azure functions as an option.

Any suggestions you all have about saving CSV to XLSX via Azure Functions?

1
The quickest way that comes to my mind is to use a python function where yuo import pandas and read the csv then rewriting it as excel. Reference for the code here datatofish.com/csv-to-excel-python. You have to download the file from Azure first, and then upload it back after the conversion, doc here docs.microsoft.com/it-it/azure/storage/blobs/…Marco Massetti

1 Answers

0
votes

Excel format is supported for the following connectors: Amazon S3, Azure Blob, Azure Data Lake Storage Gen1, Azure Data Lake Storage Gen2, Azure File Storage, File System, FTP, Google Cloud Storage, HDFS, HTTP, and SFTP. It is supported as source but not sink.

As the MSDN says, Excel format is not supported as sink by now. So you can't directly convert csv file to excel file using Copy activity.

In Azure function, you can create a python function and use pandas to read csv file. Then convert it to excel file as @Marco Massetti comments.