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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / "Create CSV Table" wit...
Power Automate
Unanswered

"Create CSV Table" with semicolon as delimiter

(0) ShareShare
ReportReport
Posted on by 14

I have a Power Automate flow that lists all rows from "Account" table, creates a CSV table and then creates the file on a file server.

The "Create CSV Table" action uses comma as a delimiter and I want to use semicolon instead, transforming the data/changing the delimiter with functions such as "Find and replace" would not work because the column data contains commas so it would mess up the data.

 

Does anybody has any options on how I can proceed to archive this?

 

 

kljunior_0-1691570661272.png

The flow

 

 

Categories:
I have the same question (0)
  • SamLed Profile Picture
    2,338 Moderator on at

    Hi,

     

    Do it that way:

     

    SamLed_1-1691591075266.png

     

    • Customize CSV columns and add '#' after each value except last one.
    • Use a compose to replace header commas and lines '#,' with following expression:
    concat(replace(first(split(body('Create_CSV_table'),decodeUriComponent('%0A'))),',',';'), decodeUriComponent('%0A'), replace(join(skip(split(body('Create_CSV_table'),decodeUriComponent('%0A')),1), decodeUriComponent('%0A')),'#,',';'))
     
    Result:
    SamLed_2-1691591267935.png

     

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

     
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    To change the delimeter of a CSV file, you have to start it with sep={delimiter}

    sep=; (semi-colon delimiter)

    sep=| (vertical bar delimiter)

     

    I made an example that is using a String type Variable. You are basically appending things to the string and then the string will be converted to a CSV file when the file is created.

     

    You need to put a blank row/line break before each new row so that it will know to go to the next row. You can put the blank after the data, but I think it has issues if there is a blank value at the end of the row.

     

    I'm putting screenshots of the steps below.

     

    Example Excel Table DataExample Excel Table DataOverall Example FlowOverall Example FlowCreate Variable with Delimiter and then Name ColumnsCreate Variable with Delimiter and then Name ColumnsAdd the Data into Columns using the delimiterAdd the Data into Columns using the delimiterExample CSV OutputExample CSV Output

     

    I don't know about performance with this if your table has 1000's of rows, but the logic will be the same however you get it to work. You need the csv to start with sep=; followed by the data. So you might be able to create an array or something and then append sep=; to the top and run that as a csv.

     

    Let me know if this works for you,

  • kljunior Profile Picture
    14 on at

    I haven't tested it yet, but I believe this solution might not be suitable for our needs. This is primarily due to the fact that the exported file contains over 100 columns, and we frequently make changes to these columns. Your proposed solution appears to be quite labor-intensive and intricate to sustain. Before considering this option, I plan to explore a few alternative methods. Should I eventually choose this solution, I'll be sure to mark it as the accepted one.

    Thank you for your response, I genuinely appreciate your input.

  • kljunior Profile Picture
    14 on at

    I ran a test with this solution, it seems to be partly working but it skips some of the data that contains commas.. For example, I have a field that contains data formatted as (15,31). When the function runs it splits them into to fields is shown below:

    kljunior_0-1692170608404.png

     

    You can see that the first and the second column is used because it is splitting that line..

  • Verified answer
    SamLed Profile Picture
    2,338 Moderator on at

    Hi @kljunior,

     

    Yeah, there is a drawback in my expression when adding "#" after a text column in Create CSV table, it includes "#" in quotes, try this one: 

     

    concat(replace(first(split(body('Create_CSV_table'),decodeUriComponent('%0A'))),',',';'), decodeUriComponent('%0A'), replace(replace(join(skip(split(body('Create_CSV_table'),decodeUriComponent('%0A')),1), decodeUriComponent('%0A')),'#,',';'), '#",''";'))
     
    SamLed_0-1692212715479.png

     

    NB: Of course, if "#" is present in your data, use another one. Otherwise, you can use @wskinnermctc method which is a nice one, it guarantees an optimal functioning without having to wonder if the used character is present in data. Even if I prefer less action use in my solutions, his solution is better if you don't have control over data entered.

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

     
  • kljunior Profile Picture
    14 on at

    That fixed the problem, thanks a lot!

  • Loevefisk Profile Picture
    6 on at

    Thanks  wskinnermctc, It work for me to. I does have 1 problem, I can't get the date and times right It shows:

    452.082.956.944.444

     

    What can I do to make it right?

     

    Another problem, I can't get the name of my CSV file correct. I would like to get the name "RefrenceNo1".CSV the Refrence number is new everytime and it is to fine in the column "RefrenceNo1" A can make it work with the Attachment from email, but not as a refrence no frem a column. What do I do wrong?

  • fpchd Profile Picture
    14 on at

    Thanks @SamLed ,

    this is a wonderful easy and fast way to change delimiter in csv in Power Automate!

    Happy to found your solution after some headaches around this problem!

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard