Convert xls to xlsx with C#
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
代碼如下: 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 編輯過(guò) |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |