Convert xls to xlsx with C#
當前位置:點晴教程→知識管理交流
→『 技術文檔交流 』
代碼如下: Sample code: Microsoft.Office.Interop.Excel. Application oExcel = new Application(); object oMissing = Type.Missing; string fileName = @"D:\Test\WorksheetNamesExpected.xls"; Workbook _book = oExcel.Workbooks.Open(fileName, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing); object fileName2 = @"D:\Test\WorksheetNamesExpected.xlsx"; object fileFormat = XlFileFormat.xlOpenXMLWorkbook; _book.SaveAs(fileName2, fileFormat, oMissing, oMissing, oMissing, oMissing, XlSaveAsAccessMode.xlNoChange, oMissing, oMissing, oMissing, oMissing, oMissing); _book.Close(); 該文章在 2023/12/30 0:54:03 編輯過 |
關鍵字查詢
相關文章
正在查詢... |