SaveAs exception

Deepthiv

Active member
Joined
Oct 3, 2005
Messages
39
Programming Experience
3-5
Exception from HResult:0x800A03EC.

is getting thrown when ever i am trying to save excel using command

oSheet.SaveAs("C:\sss.xls",Excel.XlFileFormat.xlWorkbookNormal)

where i added "Microsoft Office 11.0 Object Library" and "Microsoft Office 10.0 object library"


i am using MS-office 2003..

can some please help me. i need this desperately.

Depthi
 
If you are planning on using the app on only your computer then you only need to add a reference to MS Office 11.0 Object Library. If you are planning on distributing the app and are unsure which version of Excel the user will be using you need to use late binding.
Here's an example for Word, Excel should be similar: Starting Word *without* a reference to the OCX/DLL
 
Back
Top