Dim xlsApp As New Excel.Application Dim xlsWorkBook As Excel.Workbook Dim xlsWorkSheet As Excel.Worksheet xlsApp = New Excel.Application xlsWorkBook = xlsApp.Workbooks.Open(excelPath) xlsWorkSheet = xlsWorkBook.Worksheets(1) ' You could also do it by name: "sheet1" 'xlsWorkSheet.Rows("1:5").Delete() 'xlsWorkSheet.Rows("37:100").Delete() xlsWorkBook.SaveAs(csvPath, FileFormat:=Excel.XlFileFormat.xlCSV, CreateBackup:=False) xlsWorkBook.Close()
Application.DisplayAlerts = False ' My code Application.DisplayAlerts = True
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)