Convert CSV to Excel file

Jaganath Kumar 110 Reputation points
2025-05-01T05:48:09.29+00:00

Hi Team,

I am exploring a solution to convert CSV files to Excel format using Azure Data Factory (ADF).

The requirement is to read CSV files stored in ADLS Gen2, convert them into Excel format, and then write the resulting Excel files back to the same storage. I have heard this might be achievable via Logic Apps, but I am not entirely sure how to implement it.

Could someone please guide me with a workable and reliable solution? Ideally, I am looking for an approach that involves minimal ongoing maintenance.

Appreciate your support.

Thanks,

Jaganath

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,486 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Nandan Hegde 35,026 Reputation points MVP Moderator
    2025-05-01T06:12:44.8766667+00:00

    Unfortunately excel file type is not supported as a sink in ADF.

    Hence you can use other offerings like logic app to do it:

    https://learn.microsoft.com/en-us/archive/msdn-technet-forums/a08b6d3a-f492-4f26-9309-e172553e9fdf

    https://stackoverflow.com/questions/56773769/is-there-any-automated-way-to-convert-the-csv-files-in-azure-blob-storage-to-exc

    Or have your own custom logic via Azure functions, Databricks ,azure batch etc to do it

    0 comments No comments

  2. phemanth 15,490 Reputation points Microsoft External Staff Moderator
    2025-05-02T05:07:56.4866667+00:00

    @Jaganath Kumar

    It looks like you're trying to convert CSV files stored in ADLS Gen2 to Excel format using Azure Data Factory (ADF). Since ADF doesn't support Excel as a sink, a reliable alternative would be to use Azure Logic Apps or Power Automate for this conversion.

    Here's a general approach you can take using Power Automate:

    Set Up a Power Automate Flow:

    • Start by logging into Power Automate and creating a new flow.
    • Use the List files in folder action to get the CSV files you want to convert from ADLS Gen2.

    Read the CSV Content:

    • Use the Get file content action to read the content of each CSV file.

    Convert CSV to Excel:

    • Launch Excel via the Launch Excel action.
    • Write the loaded CSV content to an Excel worksheet using the Write to Excel worksheet action.
    • Save the Excel workbook using the Save document as action, ensuring you specify the format as .xlsx.

    Store the Converted Excel File:

    • Finally, use the Create file action to save the newly created Excel file back to your desired directory in ADLS Gen2.

    For a more refined process, you might want to incorporate error handling and logging to monitor the conversion process.

    Helpful Links:

    Convert CSV files to Excel workbooks Create a Power Automate flow to convert CSV

    This setup will minimize ongoing maintenance since Power Automate can be triggered on a schedule or based on events.

    If you need further customization or if you’re dealing with large files, you may also consider using Azure Functions or Azure Batch for better control.

    Follow-Up Questions:

    • How frequently do you expect to run this conversion? (One-time, daily, etc.)
    • Are there any specific error handling features you need in the process?
    • Would you like assistance with setting up the Power Automate flow, or do you just need guidance on the logic?

    Hope this helps! Let me know if you have any more questions 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.