Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 02, 2011 08:52 AM by someguy198650
Member
6 Points
19 Posts
Aug 17, 2010 06:13 AM|LINK
Hi,
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.
Thanks,
526 Points
92 Posts
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.
Thanks
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 , Missing.Value, Missing.Value, false, false, Excel.XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
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.
Please help!!
Monisha.
54 Points
36 Posts
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.
Participant
1495 Points
494 Posts
Nov 02, 2011 08:52 AM|LINK
Any news about this, I'm having the same problem..
Monisha
Member
6 Points
19 Posts
Excel Interop Save as
Aug 17, 2010 06:13 AM|LINK
Hi,
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.
Thanks,
Sipra
Member
526 Points
92 Posts
Re: Excel Interop Save as
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.
Thanks
http://social.msdn.microsoft.com/profile/sipra%20nayak/
If this post is useful to you, please Mark It As Answer :)
Monisha
Member
6 Points
19 Posts
Re: Excel Interop Save as
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 , Missing.Value, Missing.Value, false, false, Excel.XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
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.
Please help!!
Thanks
Monisha.
CikaPero
Member
54 Points
36 Posts
Re: Excel Interop Save as
Sep 28, 2010 08:17 AM|LINK
Hi,
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.
someguy19865...
Participant
1495 Points
494 Posts
Re: Excel Interop Save as
Nov 02, 2011 08:52 AM|LINK
Any news about this, I'm having the same problem..