2

I have a Flow to store email attachments (in .csv format) to SharePoint. Now, I want to use the file in Power-BI from SharePoint. However, I want the file in .xlsx format. Could you please suggest how I can automate the conversion of the .csv file to .xlsx file format?

Thanks in advance. My google search results suggested methods of doing it offline whereas I want to automate it either in Flow or SharePoint if possible.

0

You can follow below steps for conversion of csv file to excel through MS Flow:

  1. After uploading the csv file in SharePoint, read its content. (Reference link).
  2. Create a CSV table using the output of csv file.
  3. Create an excel file using that CSV table.
| improve this answer | |
0

To fully automate this process you could throw an Azure Function into the mix.

It would not be too complicated to create a (PowerShell) function that:

  1. Read the .csv data from SharePoint using an app registration
  2. Process the data
  3. Create an .xlsx file using Export-Excel
  4. Save this file back to SharePoint

This Azure Function can be triggered by your flow. Take a look at this example on how to get started: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-provisioning

(This is written about site provisioning, but it includes the bits you need)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.