hi i have a code here that export my listview items to excel but i want to customize each cell size and i want to format the date and landscape environment
Try
Dim objExcel As New Excel.Application
Dim bkWorkBook As Workbook
Dim shWorkSheet As Worksheet
Dim i As Integer
Dim j As Integer
objExcel = New Excel.Application
bkWorkBook = objExcel.Workbooks.Add
shWorkSheet = CType(bkWorkBook.ActiveSheet, Worksheet)
For i = 1 To Me.lvList1.Columns.Count - 1
shWorkSheet.Cells(1, i + 1) = Me.lvList1.Columns(i).Text
Next
For i = 1 To Me.lvList1.Items.Count - 1
For j = 1 To Me.lvList1.Items(i).SubItems.Count - 1
shWorkSheet.Cells(i + 2, j + 1) = Me.lvList1.Items(i).SubItems(j).Text
Next
Next
objExcel.Visible = True
Catch ex As Exception
MsgBox(ex.Message)
End Try