Hi All,
I can't figure this out, I have a listview and I want to export it and finally found how to do it but I'm stuck here..
Here's the code.
Dim Row0 As WorksheetRow = sheet.Table.Rows.Add
Row0.AutoFitHeight = False
Row0.Cells.Add("PROJECT_NAME", DataType.[String], "s67")
Row0.Cells.Add("USER_NUMBER", DataType.[String], "s68")
Row0.Cells.Add("JOBNAME", DataType.[String], "s68")
Row0.Cells.Add("BATCH_NUMBER", DataType.[String], "s68")
Row0.Cells.Add("PROCESS_CODE", DataType.[String], "s68")
Row0.Cells.Add("TOTAL_UNITS", DataType.[String], "s68")
Row0.Cells.Add("UNIT_TYPE", DataType.[String], "s68")
Row0.Cells.Add("USER_SHIFT", DataType.[String], "s68")
Row0.Cells.Add("TOTAL_UNITS", DataType.[String], "s68")
Row0.Cells.Add("JOB_STATUS", DataType.[String], "s68")
Row0.Cells.Add("START_TIME", DataType.[String], "s68")
Row0.Cells.Add("END_TIME", DataType.[String], "s68")
Row0.Cells.Add("SHIFT_START", DataType.[String], "s68")
Row0.Cells.Add("SHIFT_END", DataType.[String], "s68")
Row0.Cells.Add("TRANSACTION_TYPE", DataType.[String], "s69")
Now, I want to increment the "0" in "Row0" by one based on the count of items in listview, so I did this:
Dim totRows As Integer = ListView1.Items.Count
For i As Integer = 1 To totRows
''''I'm stucked here, what's next?
Dim Row0 As WorksheetRow = sheet.Table.Rows.Add
Row0.AutoFitHeight = False
Row0.Cells.Add("PROJECT_NAME", DataType.[String], "s67")
Row0.Cells.Add("USER_NUMBER", DataType.[String], "s68")
Row0.Cells.Add("JOBNAME", DataType.[String], "s68")
Row0.Cells.Add("BATCH_NUMBER", DataType.[String], "s68")
Row0.Cells.Add("PROCESS_CODE", DataType.[String], "s68")
Row0.Cells.Add("TOTAL_UNITS", DataType.[String], "s68")
Row0.Cells.Add("UNIT_TYPE", DataType.[String], "s68")
Row0.Cells.Add("USER_SHIFT", DataType.[String], "s68")
Row0.Cells.Add("TOTAL_UNITS", DataType.[String], "s68")
Row0.Cells.Add("JOB_STATUS", DataType.[String], "s68")
Row0.Cells.Add("START_TIME", DataType.[String], "s68")
Row0.Cells.Add("END_TIME", DataType.[String], "s68")
Row0.Cells.Add("SHIFT_START", DataType.[String], "s68")
Row0.Cells.Add("SHIFT_END", DataType.[String], "s68")
Row0.Cells.Add("TRANSACTION_TYPE", DataType.[String], "s69")
Next