0

I am trying to export the content of csv files stored in Azure Blob Storage to Excel tables in an automated way. I did some research and found in few blog articles that Azure Logic App could be used for the conversion. I tried to implement something similar but couldn't succeed.

Any suggestions/help would be appreciated.

Thanks.

CSK
  • 67
  • 3
  • 11
  • 1
    First question, do you really need to 'convert'? Excel handles CSV data quite well already. – Johns-305 Jun 26 '19 at 13:32
  • I second @Johns-305 comment. A better way to ask Johns' question again would be: *What are you trying to do that using Excel with the existing CSVs would not allow?* – gravity Jun 26 '19 at 13:39
  • @Johns-305 Yes, i need to have Excel output. – CSK Jun 27 '19 at 07:19
  • @gravity The output should be in Excel format and the process of conversion should be automated. – CSK Jun 27 '19 at 07:20
  • Ok, then the question becomes, exactly which Excel format? .xml, .xls, .xlsx, .csv (which Excel supports natively ) – Johns-305 Jun 27 '19 at 11:30
  • @Johns-305 Excel output should be need in .xlsx format. – CSK Jun 27 '19 at 11:40
  • Should have asked before, how many rows are in these files and how many files per day/hour? – Johns-305 Jun 27 '19 at 11:52
  • @Johns-305 There are around 250k rows in the file. – CSK Jun 27 '19 at 14:15
  • I would test the below Answer very carefully. 250K is a lot of OneDrive operations and there could be unintended side-effects, like 250K previous versions depending on how the connection is handled in the For Each. – Johns-305 Jun 27 '19 at 14:31
  • To be clear, I think you should quadruple check that you even need to convert. To the user experience in Excel, there's practically no difference between .xlsx and .csv. – Johns-305 Jun 27 '19 at 14:32
  • Have you considered to call Azure Databricks notebook where Python script will do the whole job for you? – Kamil Nowinski Jul 01 '19 at 10:27
  • @KamilNowinski Thanks for the suggestion. Could you please describe it in more details? – CSK Jul 01 '19 at 11:27

1 Answers1

2

If you really want to go this route I built this the other day, not that I think this is the best way to handle this but it is a way. You can build further upon this example, change the input to storage blob and the output to excel. I am just pasting the extra step where I set the output to Excel add a row into a table. Keep in mind you will need to purge the header and the last row So you need to at least fix that part.

Excel table

Find the entire flow in the other question I linked to earlier. The difference is just that I now look in a storage blob, compose the output and in the end, I write to the Excel table Flow

AdAstra
  • 1,934
  • 11
  • 9
  • Thanks for the answer. As i am quite new to logic app, i couldn't solve my issue with the above provided information. Could you please provide the detailed step-wise solution? That would be very much appreciated. – CSK Jun 28 '19 at 12:16