index > Visual Studio Tools for Office > Excel 2007 file saving

Excel 2007 file saving


Hi, i'm having trouble saving excel file with .NET.

if i'm trying to save like this:

mBook - is a excel worksheet

this.mBook.SaveAs(filename, mv, mv, mv, mv, mv, XlSaveAsAccessMode.xlExclusive, mv, mv, mv, mv);

i'm getting exception HRESULT: 0x800A03EC

when i'm saving the save workbook like this:

this.mBook.SaveCopyAs(filename);

everything is ok, except the fact, that file is saved in format, that older excel(for example 2000 or 2003) can't open.

i've tried to use different parameters on SaveAs function, for example change fileformat or access mode, but no luck :(

G.B.

I don't think Excel 2007 will be backward compatible with earlier versions of Excel, but do not quote me.

 




Need 2 be back @ MS - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
ahmedilyas

Hi GB

It's not clear what kind of environment you're working in. Is this VSTO? If not, then this isn't the right forum (even though Ahmed moved you here). You need to clarify what you're doing (VSTO, automation, classical Addin) then if it's not VSTO, post to the appropriate group, as listed in the "Please Read First" message at the top of this forum.

Ahmed is also wrong about Excel 2007 being compatible with older versions. It can be, under the right circumstances: you need to save in the older (compatible) file format OR you need to install the Conversion Pack on machines with the older version of Office.

If you haven't placed your SaveAs call in a try...catch block, then you may get more informative information about the error.




-- Cindy Meister (Word MVP)
Cindy Meister
Thanks Cindy, like i said, i was not sure at all :-) But thank-you for clearing it up


Need 2 be back @ MS - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
ahmedilyas
reply 4

You can use google to search for other answers

 

More Articles

PowerPoint Revisions
Get Excel worksheet by index
API request: Chart drawing in Excel
Setting client's default homepage in ASP.NET 2.0
Why the letter does not send and kept in a folder Proceeding? (MS...
I think that is a Bug in Visual Studio 2005 (ActionsPane)
Network problem
How to detect item class in outlook object model
Can't read app.config file
tabbing thru a form in word doc, need to store info thats highlig...
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

How to use Office commandbar objects in …
undo in excel
Error 0x80040F04 while Accessing Outlook…
UDF in Excel XP with C#
Error when Implement the DragDrop
Sending Emails ..
KB 907417 & 908002
Microsoft OutLook Plugin Problems
Excel Object Releasing from memory
Rewriting the My.Blogs in C#
Make existing workbook into a vsto solut…
Difficulties running Word Add-ins with V…
login to MS Exchange 2003
Cannot Install VSTO 2005
What do I need?

Hot Articles

Outlook and Word Addins
Where do I get the Access Developers Too…
what is the best method to let the Actio…
Insert ListObject Dynamically Failed - M…
cell formatting
ExcelWorksheet with Deployment, assembly…
help with excel
Oh Happy Day!
VSTO add in for Outlook
Creating new templates
adding a button to the email message win…
help me! how to response the drag & …
MS Office Automation Question?
Problem setting outlook reference
[sharepoint] alter template single page …

Recommend Articles

Sheet level protection
Word2003/Servlet(JSP)
Is it possible to add an entry to the ri…
Visual Studio Tools fo office
Invoke a VBA Macro from VSTO
Can't update MS Access with C++
when an Excel file is Opened it takes mo…
Add definition functionality to Word
Setting up an InfoPath Query off of Outl…
VSTA Integration
VSTO SE2005 CustomTaskPane Samples...
When will be shared add-ins for other Of…
Dragging and Dropping into a Word Document
Save each page of a word merge as pdf file
Overriding Word Intrensic Menus & To…