Skip to main content

Notifications

Community site session details

Community site session details

Session Id : P3nD/YYS4Up/cUqOLLEy8B
Power Automate - Power Automate Desktop
Answered

Convert XML files to CSV

Like (1) ShareShare
ReportReport
Posted on 1 Sep 2021 00:32:34 by 7

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

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 26 Aug 2024 at 16:13:21
    Convert XML files to CSV
    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?
  • CU26080759-0 Profile Picture
    2 on 26 Aug 2024 at 08:13:00
    Convert XML files to CSV
    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.
  • drdmitry Profile Picture
    2 on 17 Sep 2021 at 10:35:35
    Re: Convert XML files to CSV

    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.

  • charles_ross_oh Profile Picture
    91 on 02 Sep 2021 at 15:41:02
    Re: Convert XML files to CSV

    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)

  • DarinSpence Profile Picture
    7 on 02 Sep 2021 at 15:09:06
    Re: Convert XML files to CSV

    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.  

  • Verified answer
    tkuehara Profile Picture
    667 on 02 Sep 2021 at 12:57:24
    Re: Convert XML files to CSV

    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

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,075 Most Valuable Professional

Leaderboard