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 Platform Community / Forums / Power Automate / Split excel file in se...
Power Automate
Answered

Split excel file in several csv files

(0) ShareShare
ReportReport
Posted on by 176
Hi,
 
Maybe someone can help to build the flow. I have excel file on SharePoint with 10 columns, I have ~1000+ rows with data, data regulary refreshed.
I need build flow, when I run manually the flow, I need, that system will take only 2 columns from this excel file and create csv file with only these 2 columns, but also split files 200 rows per file. Example in excel file I have 800 rows with 10 columns, when I run the flow, I want to receive in the same SharePoint folder 4 csv files, where each file contain data from this excel file with 2 mentioned columns.
Additional I need make some date/time remark in original excel file, which lines was exported to csv.
Categories:
I have the same question (0)
  • stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    How far you can go for now by yourself ?
    if you got error/stuck, share the info/error/screen shot, so we can start from there . 
    Is that ok ?
     
  • slvedva Profile Picture
    176 on at
     
    I didn't create yet the flow for this process, because not so big expierence.
    I need help from start.
  • Suggested answer
    stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    @slvedva Hi,
    Share my flow, ( don't copy my code unless you understand it).
    1. Manually trigger
    2. List rows in your Excel table, key point here is enable Pagination, value =2000 for example.
    3. Use Select to pick only the two columns you need.
          For example ColumnA=item()?['ColumnA'], ColumnB=item()?['ColumnB']
    4. Initialize loop‐control variables
          a. Initialize variable: Name= startIndex, type=Integer, Value=0
          b.Initialize variable: Name= fileCount, type=Integer, Value =1
    5.  Loop until you’ve processed all rows
          Until= variables('startIndex') >= length(body('Select'))
          Inside loop:
              Compose: input=take( skip(body('Select'), variables('startIndex')),200)
          Add: Create CSV table.
          Add: Create file,  file name = concat('output_', string(variables('fileCount')), '.csv')  for example.
          Add: Increment startIndex by 200.
          Add: Increment fileCount by 1
    that's it. below for your reference.
     
     

    Enjoy Power Platform and have a great day 🚀 |  My LinkedIn

    If the answer helps, please consider 👍, Thanks.

  • slvedva Profile Picture
    176 on at
    I create the same flow
    In main table I have 580 rows, when run the flow, system create 2 csv files and both files contain the same data the first 257 rows from main table :(
    My idea, is that in this case I receive output_1 - with rows from 1-200, output_2 - 201-400 and output_3 - 401-580.
  • stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    Please check if you missed this option.
    As default, it only get 256 records, use 600 for example as your value.
     
  • slvedva Profile Picture
    176 on at
    @stampcoin, now I set and system create 3 files, but all files have full list with records, identical files. I want, that content will be splited by 200+200+180
  • stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    Please check each step very carefully, in List rows present in a table, Pagination is the only option you need, don't use filter, top, etc.
    you got 3 files, which means Do runs three times, that is correct. 
  • slvedva Profile Picture
    176 on at
    @stampcoin I found the issue, when create CSV file, I wrongly put selection step, not compose output!!! MANY Thanks.
    But one small additional question - when we do this main file split to csv files, is it possible in this main table put some date mark in some of the column, that this row is splitted and saved in csv? Because in this main file always data will added more and more and I don't want to split and save the data twice.
  • Chriddle Profile Picture
    8,691 Super User 2026 Season 1 on at
    Just use the function chunk() within an Apply to each (rows from Excel) :
    chunk(<rows_from_Excel>, 200)
     
  • Verified answer
    stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    Great you made it.
    For your additional question, that will be different story ( beyond your post question).
    And yes, you can add a column in your Excel, use date time or use flag.
    One most important thing is make sure you have unique ID for each row.
    Then you add the ID in the select action.
    In the loop, after each CVS file created successfully, then add Update a row for each record (ID).
       Key column and Key value is the key point, then select the flag column, feed it with data time or Yes/No .
     
     
     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard