cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mahmud9935
Frequent Visitor

Converting excel file in one drive to PSV or CSV format file

Dear community,

 

I have maybe simple question.  I need to build a flow which coverts excel file in one drive into the PSV or CSV file. Any ideas or connectors on how to do this. I found one solution in cloudmersive, but I think solution must be simple without involving 3rd party cloud services. maybe shall I code the shell file which runs on a schedule to make this conversion? Please share your experience and ideas, will be much appreciated.

 

Many thanks

Mahmud

3 ACCEPTED SOLUTIONS

Accepted Solutions
efialttes
Super User
Super User

Hi!

If you have Excel data store as table format in OneDrive, you can use 'List rows present in a table' action block, then assign its output as the input to "create CSV table".

Now, you can add  'Create file' action block, assign 'Create CSV table' output as its Content.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

@efialttes  Your solution is brilliant. It works!

ExportSolution.PNG

View solution in original post

Hi Everyone,

 

Finally I had found the solution how to convert excel file to any delimited format file. Below are the screenshots. The concept is to convert first the excel file into CSV format, later use the replace function to change the comma to any delimited character, I have used pipe character in my case. You can use any indicated in value section in "DelimitedChar" step below. Many thanks to all for your contributions.

 

Kind regards

Mahmud

 

Pic1.PNGPic2.PNG

View solution in original post

9 REPLIES 9
efialttes
Super User
Super User

Hi!

If you have Excel data store as table format in OneDrive, you can use 'List rows present in a table' action block, then assign its output as the input to "create CSV table".

Now, you can add  'Create file' action block, assign 'Create CSV table' output as its Content.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-bacao-msft
Community Support
Community Support

 

Hi @mahmud9935 ,

 

I have tried the following method to convert excel file to .csv. But the generated file does not seem to meet our expectations.

3.PNG

If you want such a feature to be supported by Power Automate,please consider voting for the following idea:

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Convert-a-CSV-file-to-Excel-format-using-Mi...

 

The method provided by @efialttes is a good option, please take a try and feel free to let us know if you have any questions about this method.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@efialttes  Your solution is brilliant. It works!

ExportSolution.PNG

HI @efialttes ,

 

This solution for me still incomplete. The file creates only the last row of the table, and other rows are skipped. For instance, if I have the table with 10 rows, the csv file is created only with 1 row from the last row taken from excel table. Any ideas?

 

Many thanks

Mahmud

Hi again!

I am afraid the problem in you current flow design is the following: 'Apply to each' iterates all over your excel rows, in each iteration a row is processed and, a file is created. THis means if you have N rows, you are creating N files each of them with one single excel row converted into CSV. Since the File Name is always the same, in each iteration it overwrites the previous file file.

 

You can replace Apply to Each, and use"Create CSV table" action block instead. THen, assign "Create CSV table" output as the File content input on your 'Create file' action block

https://powerusers.microsoft.com/t5/Building-Flows/Filter-Query-and-CSV/td-p/200172

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi @efialttes ,

 

Thank you for solution provided. It works to return csv file from excel table. But still my output content contains two strange columns in the csv file , called dataetag and ItemIntenalId which I dont need in the file. How to skip those two columns?

 

Many thanks

Mahmud

 

 

Capture.PNG

Hi Everyone,

 

Finally I had found the solution how to convert excel file to any delimited format file. Below are the screenshots. The concept is to convert first the excel file into CSV format, later use the replace function to change the comma to any delimited character, I have used pipe character in my case. You can use any indicated in value section in "DelimitedChar" step below. Many thanks to all for your contributions.

 

Kind regards

Mahmud

 

Pic1.PNGPic2.PNG

Hi again!

you can customize the Columns provided by "Create CSV table" output by playing with its 'Column' input, switching from 'automatic' to 'custom'. Then you can add whatever columns you need, keeping these two out of the result. You can see an example here:

https://powerusers.microsoft.com/t5/Building-Flows/Create-CSV-Table-Multiple-Rows-and-attaching-CSV-...

 

Finally, thanx for marking this topic as solved! THis way other community members facing a similar problem can find a solution faster. Please also remember you can also click on 'Thumbs up' in every answer from this current thread you found valuable... or even in all of them 😉

 
 

Flow_thumbsUp.png

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Supersan123
Helper II
Helper II

Hello Guys, I needed a flow to get my spreadsheet and generate a csv to be placed on ondedrive but I don't know why my flow generates the csv only up to line 255 and my excel has 680 lines, did this happen to you? how to solve for him to get all the lines? My csv contains data until 03/05/2020 but my spreadsheet contains data until today

forum4.jpg

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,562)