web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to split a big CSV file into smaller csv files

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am building a flow to convert csv to excel.

 

One way I found is to use a script inside Excel.

Issue is, the script in powerautomate is limited to 2000 rows.

 

My csv file is 40 000 rows long, do you if it's possible (wasn't in 2020) to divide my big csv file into 20 smaller csv files ?

 

Thank you :).

I have the same question (0)
  • MichelleRanMSFT Profile Picture
    Microsoft Employee on at
    Re: How to split a big CSV file into smaller csv files

    Hi Vincenzo,

     

    Thanks for your question! It sounds like you're trying to convert a CSV file to an Excel workbook but are having difficulty creating a Flow to do this because the CSV file is too large. I believe the solution suggested in this Github issue may be able to help you, since the poster there had a similar problem: https://github.com/OfficeDev/office-scripts-docs/issues/470#issuecomment-1090657702 

     

    Hopefully that helps! Let me know if you have any questions.

     

    Best,

    Michelle

  • Verified answer
    takolota1 Profile Picture
    4,944 Moderator on at
    Re: How to split a big CSV file into smaller csv files

    @Anonymous @MichelleRanMSFT 

     

    And if your CSV has double quotes around any items with in-data commas, then you can use this template to parse it all at once without breaking it up:

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/CSV-to-Dataset/td-p/1508191


    And 40,000 rows may take a while in any Apply to each method of adding things to Excel. So you could try using this Excel batch Upsert template:

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Excel-Batch-Create-Update-and-Upsert/td-p/1624706

  • Community Power Platform Member Profile Picture
    on at
    Re: How to split a big CSV file into smaller csv files

    Hi,
    Thank you all for your answers, I finally went for Takolata csv template that I will probably mix with the Excel batch upsert template once I figure out how it works.

    Thank you all 🙂

  • takolota1 Profile Picture
    4,944 Moderator on at
    Re: How to split a big CSV file into smaller csv files

    For adding in the Batch Upsert, you probably just need to add the Parse JSON Body to the Update data Select action. Then you can use the dynamic content from that Parse JSON & start relabeling things in that Select action to fit your Excel column names.

    From there it should be almost identical to the tutorial using the Excel datasource.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard