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 / CSV Made with PA Deskt...
Power Automate
Unanswered

CSV Made with PA Desktop wrong format

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

 

I'm trying to fetch data from an SQL DB using PA Desktop and putting that data with all the columns in an excel file and have it saved as a CSV.

I made a template excel file that is being used to import the SQL data to but when the desktop app saves the file as a CSV, the format is wrong.

All the columns should have their own field, but the CSV that the desktop app makes shoves all the data and columns into the first rows instead of properly using the columns.

Any idea how I can fix this? 

Everything is pushed into column A, it should use all the columns required instead.

 

When I do these actions manually, and save it as a CSV myself, the format is correct.

Lumina_0-1718103358855.png

 

I have the same question (0)
  • eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at

    CSV means comma-separated value. So as long as you have the commas to separate columns it should be fine I think. Its just visually shows it weird in excel for some reason.
    I've noticed that when using Write to CSV file -action and opening the csv file with Excel I need to change the data with Text to Columns like so:

    First select all the rows (Ctrl + A)

     

    eetuRobo_0-1718107513307.png
    eetuRobo_1-1718107513308.png

    eetuRobo_2-1718107513308.png

    Next and Finnish


    But if I open the csv file (without doing any formatting to it manually) with Launch Excel in PAD it opens it correctly.

    eetuRobo_6-1718107811635.png

    eetuRobo_8-1718107926717.png

     

    If I open the file manually after the Write to CSV file:

    eetuRobo_4-1718107734795.png


    When Launch Excel opens the file it looks good:

    eetuRobo_7-1718107853375.png


    It could be about regional settings. Maybe Excel doesn't format it because its not sure if its decimal or something.

  • CU02080621-5 Profile Picture
    on at

    It does indeed open fine when I open the CSV in PA Desktop, problem is this flow is going to pull the whole DB multiple times a week and upload it to a remote server, so I have no idea if the upload will succeed....

    Weird

  • eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at

    It should work since csv is just data with comma separated values. So as long as your data is separated by commas and the file format is .csv it is correctly formatted csv. Even if your Excel doesn't always show it the right way.

    So I think it should be fine.

    Have you tested it at all with one file and checked if the server takes the data correctly?

  • CU02080621-5 Profile Picture
    on at

    I will try, problem is that if it goes wrong, a few hundred users would have their accounts suspended 😄 

    But I checked and if the file is wrong or can't be read, it'll just be ignored. 

    Will update later, thanks all! 

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You do not need to use Excel to create a CSV file. Just use the Write to CSV file action that is specifically designed to do this. You might need to define the separator under the "Advanced" options of the action.

  • Verified answer
    CU02080621-5 Profile Picture
    on at

    I fixed it by having an action "replace" that simply replaces all the kommas to semicolon's from my csv table variable, and then write the changed variable to a csv file.

    Maybe not the simplest way but it works so 🙂 

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard