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 / Convert XML files to CSV
Power Automate
Answered

Convert XML files to CSV

(1) ShareShare
ReportReport
Posted on by 7

Could Power Automate be used to convert 34 GB of data spread over 31 XML files to CSV?

I have the same question (0)
  • Verified answer
    tkuehara Profile Picture
    667 on at

    Hi @DarinSpence 

     

    Short answer: yes, it is technically possible.

    Long answer: it would take a long time to read each file and generate a CSV from it. I think there are better ways/tools to do this task.

    If you decide to proceed with this solution, here's a sketch (please use the relevant XML-related actions suited to your needs; I used those two just for the example below):

    tkuehara_0-1630587282148.png

     

  • DarinSpence Profile Picture
    7 on at

    You are 100% right about how long it will take to read up the file and convert it to CSV.  I found a simple tool that does this, but not at the command line or in any way that supports processing through a folder of 30 files.  Even though it's just 30 files, I'd like to find a way to automate the conversion of XML to CSV somehow.  

  • charles_ross_oh Profile Picture
    91 on at

    Are they all using the same schema and are they "flat" in structure (table-like) or hierarchical?  Only tabular files would be a good fit. If they are flat XML, Excel will open them and can save to CSV, for example of a dumbed-down approach. Python and the toolkits used by Data analysis and "data science" wrangler crowd (data engineers) surely have some cookbook solutions or even libraries to do this with command lines.  For example docx-utils · PyPI

     

    I can also imagine transforming it to JSON in between, because the kids these days tend to have lots of JSON tools for same. There is a command line program named JQ that does all kinds of things like this.     jq (stedolan.github.io)

  • drdmitry Profile Picture
    2 on at

    There is an online solution to automate the conversion of large XML files to CSV (or Excel) format.

    https://conversiontools.io/convert/xml-to-csv - Conversion Tools offers a way to transform XML file data into tabular representation.

    This works even for non-tabular hierarchical data, the converter making it flat and tabular.

    Note: there are limits defined for the file size.

  • CU26080759-0 Profile Picture
    2 on at
    To convert an XML file into a CSV file, you can use Sonra Flexter. Flexter is designed to handle this transformation efficiently even for a huge sized data files as yours. You can find more about the product and it's perks at their website. They offer free trial web tool where you can test with smaller sized files first.
  • takolota1 Profile Picture
    4,974 Moderator on at
    If each file or chunks of each file didn’t exceed the 200mb limit you could use a cloud flow, bring in the file content & if needed convert base64 to the stringified xml, use the xml( ) expression to get it in xml type, then convert to json with the json( ) expression, & then insert the json in the Create CSV table action?

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard