About spliting the excel sheet based on different types of data /

Actually I am following her video in spilting data to multiple sheet based on “Type”. It’s ok to spilt out multiple sheet?
For example, one sheet is for ‘Type (4N)’ and paste all column data for 4N;one sheet is for ‘Type (3N)’ and paste all column data for 3N.

When i follow her video, i got some issue as follows

After I paste the data from 2.1 Summary, it is supposed that it can generate different sheet based on "Type”, but there is something went wrong

Assign Activity

TableList | List(Of DataTable) =

dtData.AsEnumerable().GroupBy(Function (x) x("Type").toString.toUpper.Trim).Select(Function (x) x.CopyToDataTable).toList

Then loop over the Table List and write out ech iterated Table to a Worksheet
Worksheetname = LoopedTableVar.Rows(0)(“Type”).toString

MU real.xaml (16.5 KB)
I am still confusing
can you help me to check where I should do this aasign and what I need to make edit? Thank you


May i ask I still need to keep this acvtivity or delete it?

  • read the Excel - dtData
  • Assign - TableList = … as mentioned above
  • For each Activity | tbl in TableList
    • write the tbl to Excel - use.tbl.Rows(0)(“Type”).toString for the worksheet name

in general, that’s it