Last post Aug 01, 2012 10:22 PM by panric
Member
1 Points
60 Posts
Jul 26, 2012 03:05 AM|webfriend13|LINK
HI All,
i created an excel file using System.IO. After creating the file,I am using following code to convert the file into native excel to redcue the file size while retaining the format.
try { app = new Application { Interactive = false, AlertBeforeOverwriting = false, DisplayAlerts = false, DisplayInfoWindow = false }; //Open previosuly saved workbook var workbook = app.Workbooks.Open(path); workbook.SaveAs(path, XlFileFormat.xlExcel12); workbook.Close(); }
The code is working fine but it is taking too long. Is there any way to reduce the time it is taking to generate file?
Star
9210 Points
2981 Posts
Jul 26, 2012 04:11 AM|Mudasir.Khan|LINK
whats the size of the file, and it also depends on the OS and hardware what you might do is implement
Task Parallel Library and do it Asynchronoulsy
12 Points
19 Posts
Jul 30, 2012 02:13 AM|panric|LINK
I suggest you have a trial with Open XML Or use other 3rd party library like Spire.xls or Aspose.cells. This will promote the speed.
An article on Interop.Excel
Jul 31, 2012 02:24 AM|webfriend13|LINK
Hi Panric,
Thank you for your reply.Can you please suggest any free library.
Aug 01, 2012 10:22 PM|panric|LINK
You may see this discussion on ASP.NET. It is talking about a free personal ExcelWriter.
Member
1 Points
60 Posts
Microsoft.Office.Interop.Excel.Application taking too long to save a file
Jul 26, 2012 03:05 AM|webfriend13|LINK
HI All,
i created an excel file using System.IO. After creating the file,I am using following code to convert the file into native excel to redcue the file size while retaining the format.
The code is working fine but it is taking too long. Is there any way to reduce the time it is taking to generate file?
Star
9210 Points
2981 Posts
Re: Microsoft.Office.Interop.Excel.Application taking too long to save a file
Jul 26, 2012 04:11 AM|Mudasir.Khan|LINK
whats the size of the file, and it also depends on the OS and hardware what you might do is implement
Task Parallel Library and do it Asynchronoulsy
Member
12 Points
19 Posts
Re: Microsoft.Office.Interop.Excel.Application taking too long to save a file
Jul 30, 2012 02:13 AM|panric|LINK
I suggest you have a trial with Open XML Or use other 3rd party library like Spire.xls or Aspose.cells. This will promote the speed.
An article on Interop.Excel
Member
1 Points
60 Posts
Re: Microsoft.Office.Interop.Excel.Application taking too long to save a file
Jul 31, 2012 02:24 AM|webfriend13|LINK
Hi Panric,
Thank you for your reply.Can you please suggest any free library.
Member
12 Points
19 Posts
Re: Microsoft.Office.Interop.Excel.Application taking too long to save a file
Aug 01, 2012 10:22 PM|panric|LINK
You may see this discussion on ASP.NET. It is talking about a free personal ExcelWriter.