i want to parse a large size of text file, the size of the text file is 257MB. i use listview to view the parse data after i parse the large file i want to save it as an excel file but everytime i click the button save as excel file i will got this error "Run-time 6 Overflow"
below is my code to save the parse data as excel file
Private Sub cmd_save_excel_Click()
Dim ExcelObj As Object
Dim ExcelBook As Object
Dim ExcelSheet As Object
Dim i As Integer
Set ExcelObj = New Excel.Application
Set ExcelBook = ExcelObj.Workbooks.Add
Set ExcelSheet = ExcelBook.Worksheets(1)
With ExcelSheet
For i = 1 To ListView1.ListItems.Count
'.Cells(i, 1) = ListView1.ListItems(i).Text
.Cells(i, 1) = ListView1.ListItems(i).SubItems(1)
.Cells(i, 2) = ListView1.ListItems(i).SubItems(2)
.Cells(i, 3) = ListView1.ListItems(i).SubItems(3)
.Cells(i, 4) = ListView1.ListItems(i).SubItems(4)
.Cells(i, 5) = ListView1.ListItems(i).SubItems(5)
.Cells(i, 6) = ListView1.ListItems(i).SubItems(6)
Next
End With
ExcelObj.Visible = True
Set ExcelSheet = Nothing
Set ExcelBook = Nothing
Set ExcelObj = Nothing
End Sub
i need your help!! thank you in advance..