Uipath Transpose excel after every 4 row

Lets assume

  • 4 is fixed
  • Project is set to Windows Compatibility
  • Excel is read in into a datatable - dtData

Prepare an empty DataTable with Build DataTable Activity, Configure the 4 cols - dtResult

Assign Activity
dtResult =

dtData.AsEnumerable.Select(Function (x) x(0)).Chunk(4).Select(Function (x) dtResult.Rows.Add(x)).CopyToDataTable

grafik

3 Likes