web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help with convert exce...
Power Automate
Answered

Help with convert excel based csv to xlsx

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Dear,

 

hopefully someone have an idea or workaround how I can convert a csv into a usefull format that I can use the excel connector "Create Table" and "List rows in present table".  Currently , I'm struggle with it because I can only use default connectors.

 

Thank you for any idea's 

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @Anonymous ,

     

    As far as I know, we need to rely on the Premium connector to convert csv to xlsx. Like Cloudmersive Document Conversion connector and Plumsail Documents connector.

     

    Best Regards,

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It' much easier as I thought.

     

    1. Copy the csv to "Onedrive" make the file text-based

    2). Split csv by carriage return , returns the available lines in my csv

    3). Loop, carriage return result,

    4). Split csv again based on the delimitier

    5. Now you can write back the array to a pre-defined excel template with, "Add row to table"

     

    Unbenannt.PNG 

  • ObiShyamKenobi Profile Picture
    23 on at

    Hi @Anonymous 
    If you still have this flow, can you provide more details for each of the steps please?

     

    Thanks.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    How much detail you need ?

    1. I receive my csv file as email attachment from an automatic system report, which is my trigger. At first a save the attachment to my onedrive , because the csv is not readable from email. When you save it to onedrive and reopen it its a normal txt file. In additional I can only use standard connector
    In my case I need an extra step, because the csv file is inside a Zip Archive.  After the csv is saved to my onedrive , I save the File Id inside a variable

    Fanatic_0-1658424516702.png

     

    2).  I use get file from onedrive with m,y save id to get the csv as txt file. Then I use a filter array, with split csv file by newline to split each csv row into one line. Because a CSV file ends always with /n  .  And item() is not equal is checking empty lines. So I exclude each empty line.

    Please note that the function "split" is limit to your licence . In my basic E3 licence my csv file can't be bigger as 5000 rows. Everything else is not catched by the split funtion.

     

    Split(body(<csv file>), variable('Newline'))

     

    Afterwards I use a select action to format my data for each column, to remove unexpected character.

    For each column selection  , I use split the row again by my delimiter

    split(item(),'<delimiter>')[0] = Column A

    split(item(),'<delimiter>')[1] = Column B

    split(item(),'<delimiter>')[2] = Column C

     

    After that you can write your data into sharepoint or else. I have only one problem in my systems, when any data column contains a "enter character" or " /n" . then the csv can't be split correctly.  I'm still searching an idea for that

    Fanatic_1-1658424737666.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard