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 编辑过 |
关键字查询
相关文章
正在查询... |