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

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

 

  • eetuRobo Profile Picture
    4,589 Super User 2026 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,589 Super User 2026 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard