Hi all,
Is there a way to split this excel into 3 seperate datatables?
The final output will be in step 4, which is to get 3 datatables.
Read Range as dtAll in Test Sheet
Count the number of Row.
Get total rows in dt divide by 3
Create 3 new datatables base on result in 3.
a. dt1 = row2 - 61
b. dt2 = row 62 - 121
c. dt3 = 122 to last row.
TestFile.xlsx (43.2 KB)
Thanks for helping out in advance!
Regards
Hidayat
Hi @Md_Hidayat
try this
Read excel file and store in datatable
Assign a int32 variable a = 60
Use the while loop as below condition
a<dt1.Rows.Count
Inside the loop do the following
a. dt_temp = dt1.AsEnumerable().Skip(a).Take(60).CopyToDataTable
b. Write dt_temp into excel file
c. Increment a= a+60
Let me know if it works
Thanks & Regards,
Nived N
1 Like
Thanks for the quick reply!
I tried your method. Is it possible to save the into 3 datatables to enable parallel processing?
Regards
Hidayat
ppr
(Peter Preuss)
March 15, 2023, 5:37pm
5
Yes,maybe need some little adaptions. But the building Blocks and the main Idea would be the same
Thanks @ppr and @NIVED_NAMBIAR for pointing the correct direction.
Iām able to mix and match both of you guys solutions.
Regards
Hidayat
1 Like
system
(system)
Closed
March 18, 2023, 5:51pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.