S
speed780
Guest
Hello,
I have several XLSX files and I would like to convert each of its files to XLS format in a very fast time, that is to say the conversion of an XLSX file to XLS should take some 100 ms.
To do this, I had thought of using Interop, but it is very slow, at least 8 seconds to convert an XLSX file to XLS.
Here is my code with Interop:
string fileNameXlsx = @"C:\file1.xlsx";
string fileNameXls = @ "C:\file1.xls";
_Application excelTemplate = new Excel.Application ();
excelTemplate.Visible = false; // do not open the file
excelTemplate.DisplayAlerts = false;
WbTemplate Workbook;wbTemplate = excelTemplate.Workbooks.Open(fileNameXlsx);
wbTemplate.SaveAs(fileNameXls, FileFormat: XlFileFormat.xlExcel8);
wbTemplate.Save();
wbTemplate.Close(true);
excelTemplate.Quit();
With Interop, it is very slow to convert XLSX to XLS.
Do you know of a library in C# that allows you to convert an XLSX file to XLS very quickly (ideally 300 ms/file) ?
If yes, could you give me an example of C # code, please?
Thanks.
Continue reading...
I have several XLSX files and I would like to convert each of its files to XLS format in a very fast time, that is to say the conversion of an XLSX file to XLS should take some 100 ms.
To do this, I had thought of using Interop, but it is very slow, at least 8 seconds to convert an XLSX file to XLS.
Here is my code with Interop:
string fileNameXlsx = @"C:\file1.xlsx";
string fileNameXls = @ "C:\file1.xls";
_Application excelTemplate = new Excel.Application ();
excelTemplate.Visible = false; // do not open the file
excelTemplate.DisplayAlerts = false;
WbTemplate Workbook;wbTemplate = excelTemplate.Workbooks.Open(fileNameXlsx);
wbTemplate.SaveAs(fileNameXls, FileFormat: XlFileFormat.xlExcel8);
wbTemplate.Save();
wbTemplate.Close(true);
excelTemplate.Quit();
With Interop, it is very slow to convert XLSX to XLS.
Do you know of a library in C# that allows you to convert an XLSX file to XLS very quickly (ideally 300 ms/file) ?
If yes, could you give me an example of C # code, please?
Thanks.
Continue reading...