Exporting Excel Spreadsheet to XML Spreadsheet.

Exporting Excel Spreadsheet to XML Spreadsheet.

Post by maqsood_ah » Sat, 22 May 2004 20:16:24


Hello,
I have created a .net Library in C# that gives funcationality for
Excel Interoprebility.
Now, whenever I want to "Save" Excel Spreadsheet as XML Spreadsheet it
raises an Exception: "Exception in HRESULT: 0x800A03EC".
Here is my code snippet:

***********************************************************
private static Excel.Application excelApp;
private Excel.Workbook workBook;
workBook = excelApp.Workbooks.Open(WorkbookPath,0,false,5,"","",false,Excel.XlPlatform.xlWindows,"",true,false,0,true,false,false);

// Do Something useful.

workBook.SaveAs(@"C:\abx.xml",Excel.XlFileFormat.xlXMLSpreadsheet,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Excel.XlSaveAsAccessMode.xlShared,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing);
************************************************************

Interesting fact here is, this same method call runs fine when I save
Excel Spreadsheet as another Excel Spreadsheet (I know about
SaveCopyAs(filename)).

Am I doing anything wrong, while exporting .xls file to .xml file?
I'll be wating for an early responce
 
 
 

1. Copy Records from one excel spreadsheet to another excel spreadsheet

2. Opening an Excel spreadsheet from within an Excel spreadsheet

I am writing a macro in Excel 2003 that opens another Excel spreadsheet using
the following VB statement:

Set RELReport = Workbooks.Open(s_externalLink, 0, ReadOnly:=True)

RELReport is a workbook object, and s_externalLink contains the path and
file name of the spreadsheet to open. The spreadsheet opens OK, but then the
macro hangs and won't go to the next Visual Basic statement. If I put a
breakpoint on or just prior to this statement and step through the code in
the de *** , it works fine, but without using the de *** , it hangs every
time.

Can anyone tell me how to fix this problem? Thanks.

3. How do I combine data from various Excel spreadsheets into one Excel spreadsheets

4. Macro to save excel XP spreadsheet to excel 97 spreadsheet format

5. Import excel spreadsheet into an excel spreadsheet

6. Program link to Excel spreadsheet opens Excel but not spreadsheet

7. can I export a spreadsheet into a different spreadsheet with different column headings

8. Import spreadsheet, MATLAB calc, export spreadsheet

9. Export to Excel, name and format exported spreadsheets

10. Exporting to Excel: Multiple tables in 1 spreadsheet - the last of 3 tables won't export.

11. Excel 2007 spreadsheet references older office spreadsheets

12. Can Excel Spreadsheets be saved as Microsoft Works spreadsheets?

13. Converting excel spreadsheet to a works spreadsheet

14. For Dave P. From OP: .csv spreadsheet To Normal Excel Spreadsheet Format: How Please ?

15. In Excel I want to copy text from spreadsheet to spreadsheet