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 Automate
Answered

How to read csv file

(0) ShareShare
ReportReport
Posted on by 2

I have a flow that reads csv file line by line, and the flow has the following compose action:

array.JPG

the output will looks as the one below:

Capture.JPG

In the next step, I'm trying create a map to get each value from by using the compose action

 

 

split(item(),';')[0]
split(item(),';')[1]
split(item(),';')[2]

 

 

this works well for the first row, but not for the second one as it has a string with comma and the value is surrounded by \"   \" so the map will look as:

 

 

[
 "Name": "First item",
 "Description: "This is the test of the first item",
 "Amount": "1"
{
},
{
 "Name": "Second item",
 "Description: "\"The second",
 "Amount": "and last item\""
}
]

 

 

Could you help me to get the values correctly?

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    If your CSV data has commas within the values, it definitely makes it much harder to extract out.

     

    See my solution (link below) that uses Office Scripts to pass in a CSV file and it return the JSON data - including handling embedded commas.

     

    Solved: Re: Parsing a CSV that contains embedded commas - Power Platform Community (microsoft.com)


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard