Hi Expert,
I have an Excel file with 1319 line items. I need to split multiple files with 200 line items each with the same header. How can achieve this by LINQ. Attached input file for your reference.
Regards,
Balachander
Split_Input.xlsx (43.4 KB)
@Balachander_Pandian
Do you want split total line items into mutiple datatables having 200 line items each
dt.AsEnumerable().Chunk(200).Select(Function(a) a.CopyToDataTable()).ToList()
gives output as list of datatables
vrdabberu
(Varunraj Dabberu)
March 1, 2024, 5:35am
3
Hi @Balachander_Pandian
Try this:
dt.AsEnumerable.Chunk(200).Select(Function(a) a.CopyToDataTable).ToList
BlankProcess20.zip (128.1 KB)
Regards
rlgandu
(Rajyalakshmi Gandu)
March 1, 2024, 5:37am
5
lrtetala
(Lakshman Reddy)
March 1, 2024, 5:46am
6
@Balachander_Pandian
PFB workflow for your reference
BlankProcess20.zip (238.3 KB)
Output:
Regards,
1 Like
vrdabberu
(Varunraj Dabberu)
March 1, 2024, 5:52am
8
Hi @Balachander_Pandian
Check the below zip file
BlankProcess20.zip (128.1 KB)
Hope this meets your requirement
Regards
1 Like
Hi @Balachander_Pandian
Output with different sheets
Split_Input.xlsx (74.6 KB)
Hope it helps!!
1 Like
Hi @vrdabberu Thank you so much …It works well.
vrdabberu
(Varunraj Dabberu)
March 1, 2024, 11:31am
11
Hi @Balachander_Pandian
If the solution works for you, please mark my post as solution to help other members.
Happy Automation!!
system
(system)
Closed
March 4, 2024, 11:32am
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.