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 / save as csv does not r...
Power Automate
Unanswered

save as csv does not recognize unicode output from sql

(0) ShareShare
ReportReport
Posted on by 239

Hi,

i am building a flow that would be triggered from PowerApps button, to run a SQL query and then save the output in csv file (check screenshot) Screenshot (55).png

the problem is my SQL table contains columns with Arabic letter data, and when it is saved as csv it is scrambled!the output saved filethe output saved file

 

 

but when i change the flow to save the sql query output as *txt file, here the Arabic letters are fine and intact.

 

so is there a way to directly let it save unicode csv file?

 

Note: my column type in SQL is (nvarchar)

 

thanks,

Mohammad

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

    Hi @mokhawaja,

     

    Have you tried to open the file with a different option such as Word document to see if it will be OK?

     

    Please check your SQL query, and make sure they are running without problems.

     

    I have tried the Create CVS table action on my side, it got value from SharePoint list using the action Get items, then when I opened the file with Excel/Word document, it wasn’t scrambled.

     

     

    Best regards,

    Mabel Mao

  • mokhawaja Profile Picture
    239 on at

    hi @v-yamao-msft,

    i tried to open it in Word, and it prompt "File Conversion" (check screenshot), and it reads correctly, but i need it to open in excel as i am planning to send this file to my users as attachment, and i want to make their lives easier by directly using the file in excel.

    Screenshot (57)_LI.jpg

     

     

    thanks,

    Mohammad

     

  • KovA Profile Picture
    7 on at

    Hi,

     

    I see this post is a bit old, but it might be relevant for some. I had the same issue, getting the data from the DB, exporting to CSV and opening it in Excel. The character encoding was wrong, no matter what I tried to do.

     

    But! I opened the same CSV file in Notepad++ and the characters were correct. You can also check the results in the "Create CSV Table" Output, the characters should be good there too.

     

    So it turns out that Excel automatically set the character encoding to some default value (I assume this is based in your regional settings in Windows) when you open the file just by double clicking, but this is not the way to import data from a CSV to Excel.

     

    Solution:

    Go to the Data tab on the ribbon, select import from CSV and change the character encoding to the correct one. For me it was UTF-8.

     

    OpenCSV.png

     

  • seewo Profile Picture
    59 on at

    no any solution on it , in 2022,  I face this issue yet.

  • mohanade Profile Picture
    65 on at

    I've found the solution thanks to this post

     

    concat(uriComponentToString('%EF%BB%BF'),body('Create_CSV_table'))

    mohanade_0-1678198078987.png

     

  • Bidhu Profile Picture
    5 on at

    Hi, I have Arabic characters in my CSV data. I tried using various encoding approaches including the one suggested above. But, none of them helped. Interestingly, when I opened the CSV file in Notepad++, the Arabic characters are shown correctly. Can anyone please suggest how can I solve this?

  • mohanade Profile Picture
    65 on at

    I've tested it in Arabic and it works, make sure you implemented your flow correctly as per my screenshot 

  • Bidhu Profile Picture
    5 on at

    Thank you. It worked finally.

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard