Convert CSV into xlsx via VB6
Public Function ConvertToXlsx(filename As String, to_filename As String) Dim objExcel As Object Dim objWorkBook As Object 'Instantiate Excel Set objExcel = CreateObject("Excel.Application") 'open the CSV file Set objWorkBook = objExcel.Workbooks.Open(filename, , True, 4, , , , , , , , , , True) '= objExcel.Workbooks.Open(filename, , True, 4) 'Save the file as excel workbook objWorkBook.SaveAs to_filename, 51 'close workbook objWorkBook.Close False 'quit excel objExcel.Quit 'clean up Set objWorkBook = Nothing Set objExcel = Nothing End Function