I’m trying to use your code, for a datatable on a excel file.
But, i get this error : Value was either too large or too small for an Int32.
I mean when it’s small numbers, for like “19/250”, i get the error, when it’s bigger it works fine, for like “700/250”.
Can you help on this please.
Note that the input value can be random, from 1 to 10000000… but the the file shouldn’t have more than 250 rows.
@maroua301 - You can first read the dt.rows.count to check if it is less than 250…
If its < 250 you don’t need a split
Else you use split code…
Thanks, for the idea. But something ain’t right, when i do “19/2”, i get the same error again ?
we assume that you are meaning:
19 - Rows Count, 250 Segment Size
it is working withour error:
Maybe you can share some more details on your implementation. Especially on the part where the Random is used. Thanks
Thanks to you @ppr, I noticed I was giving the “250” to NoOfSegments instead of SegmentSize, my mistake
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.