How can i divided datatable into multiple tables with 15 rows each and last table should be less than 15 rows or equal to 15 rows?

How can i divided datatable into multiple tables with 15 rows each and last table should be less than 15 rows or equal to 15 rows?

@MitheshBolla
Try this one in UiPath:

dividedTables = (From row In inputTable.AsEnumerable()
                 Select row
                 Let rowNumber = inputTable.Rows.IndexOf(row) + 1
                 Group By groupIndex = (rowNumber - 1) \ 15 Into Group
                 Select Group.CopyToDataTable()).ToList()

@MitheshBolla

Check this …instead of 20000 you can use your rows 15

Cheers