splitting an excel file into multiple excel files
Use Case Description
hello, i am stucked. i want to split my excel file to multiple excel files for every 100 rows. total number of rows are dynamic. could you please help me.
AS-IS WORKFLOW, TO-BE WORKFLOW
-
Other information about the use case
Industry categories for this use case : Logistic
Skill level required : Beginners
UiPath Products that were used : UiPath Studio
Other applications that were used : EXCEL
Other resources : -
What is the top ROI driver for this use case? : Other
Yoichi
(Yoichi)
April 6, 2023, 8:45am
2
HI,
The following post will help you. There is a sample workflow to split single excel sheet to multiple xlsx files.
HI,
How about the following?
[image]
Enumerable.Range(0,(dt.Rows.Count \ chunkSize)+1).Select(Function(i) dt.AsEnumerable.Skip(i*chunkSize).Take(ChunkSize).CopyToDataTable).ToArray
Sample20221108-4.zip (132.8 KB)
Regards,
Regards,
Hi @edipyilmaz , welcome to the Community.
There is a component in the marketplace which helps you split the datatable into chunks, check this out:
Also, the following thread contains some discussions around this:
Hey guys,
So i generate a datatable with 100+ rows every week. Now iād like to split that table into 4 parts with about equal numbers of rows in each. Found some rather complicated solutions but is there a simple way to do this?
And also a random question: What would be the best language to learn to improve in UIpath? C#?
Thanks,
Hope this helps,
Best Regards.
1 Like
Hi @edipyilmaz ,
Test_Skip_Take.xaml (6.6 KB)
Please do try this workflow. I have tested it. It works as per your requirement.
Hope it helps.
Regards,
Harshith
1 Like
hello Harshith_Adyanthaya,
The code that you shared has worked.
Thank you very much.
1 Like
system
(system)
Closed
April 10, 2023, 7:16am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.