hi i manage to export a data coming from listview to excel here is my code
Try
' Open output file
Dim os As New StreamWriter(filename)
' Write Headers
For i As Integer = 0 To ListView1.Columns.Count - 1
' replace quotes with double quotes if necessary
os.Write("""" & ListView1.Columns(i).Text.Replace("""", """""") & """,")
Next
os.WriteLine()
' Write records
For i As Integer = 0 To ListView1.Items.Count - 1
For j As Integer = 0 To ListView1.Columns.Count - 1
os.Write("""" & ListView1.Items(i).SubItems(j).Text.Replace("""", """""") + """,")
Next
os.WriteLine()
Next
os.Close()
Catch ex As Exception
' catch any errors
Return False
End Try
Return True
my problem is how to set the size of the cell in excel? i mean how to change the width?