Hi, I'm having problems exporting data from a listview control to excel
for example we have item "serial" with the child items "pass value".
for example we have item "serial" with the child items "pass value".
PHP Code:
serial | value1 | value 2 | value 3 | value 4 |
-------------------------------------------
serial | a | b | c | d |
PHP Code:
For i = 1 To ListView1.listitems.count
With xlSheet
'serial
.Cells(init_row + i + 1, init_col + 1) = ListView1.listitems.Item(i)
For j = 1 To ListView1.ColumnHeaders.count - 1
'pass value
.Cells(init_row + i + 1, init_col + 1 + j) = ListView1.listitems.Item(i).SubItems(j)
Next j
End With
Next
init_row = init_row + i + 1
PHP Code:
How to arrange the data in the required format?
serial | a | | | b | | |
|-------------------------
| c | | | d | | |
---------------------------------