Hi @ppr
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.
Thanks
@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…
@prasath17
Thanks, for the idea. But something ain’t right, when i do “19/2”, i get the same error again ?
ppr
(Peter)
4
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
2 Likes
Thanks to you @ppr, I noticed I was giving the “250” to NoOfSegments instead of SegmentSize, my mistake 
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.