Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 02, 2011 08:52 AM by someguy198650
Aug 17, 2010 06:13 AM|LINK
I want to Save excel workbook using Excel interop in 97-2003 format. Currently I have Office 2007 installed on my machine.
below is the code I am using.
_book.SaveAs("New.xls", Excel.XlFileFormat.xlWorkbookDefault, Missing.Value, Missing.Value, false, false, Excel.XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
The solution is little urgent.
Aug 17, 2010 06:34 AM|LINK
Is it saving as .xlsx format ?
When you are referencing Microsoft.Office.Interop.Excel.dll take it from the below path. This is the version for excel 97-2003.
C:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Excel.dll.
HHope this helps.
Aug 31, 2010 08:53 AM|LINK
I am sorry for the late reply... Got Stuck in my Project Work.
It is saving in XLS format...
but my new problem is I am having Office 2010 installed on my Server which is having (Office14) dll
C:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office14\Microsoft.Office.Interop.Excel.dll.
And my client has Office 2003 installed on his machine. Below is the code I am using to Save the file as 2003 Workbook format.
The generated XLS file gets Corrupted only for those user's who has Office 2003 installed, for other user's the generated file is not corrupted.
_book.SaveAs("New.XLS", Excel.XlFileFormat.xlExcel8 ,
I want to find a Solution so that my generated xls file is not corrupted and it should not be dependant on any Office version.
Sep 28, 2010 08:17 AM|LINK
if you want to avoid subtle versioning issues with
Excel Interop, I recommend you take a look at this
Excel .NET library.
It is very fast and easy to use. It doesn't use
Excel Automation, instead it has its own parsing engine.
Nov 02, 2011 08:52 AM|LINK
Any news about this, I'm having the same problem..