Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SaveCopyAs generating the 0x800a03ec exception

If I have a newly created Excel spreadsheet and I dont tab out of the
current cell and I call the SaveCopyAs method, then I get exception
0x800a03ec thrown. The user is in "edit mode" ie has typed something
into a cell but hasn't confirmed it

Any ideas on how to avoid this?

(What the code is doing is saving the current Excel workbook into our
database).

Abridged sample code:

try
{
o =
System.Runtime.InteropServices.Marshal.GetActiveOb ject("Excel.Application")*;

}
catch (System.Exception)
{
// Excel is not running
return;
}


_excelApp = o as Excel._Application;
// connect to current Excel workBook
_workBook = _excelApp.ActiveWorkbook;
if (_workBook == null)
{
// No workbook is currently defined
return;
}


_excelApp.DisplayAlerts = false;
_workBook.SaveCopyAs(excelFile);

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HRESULT: 0x800A03EC exception when trying to hide a sheet. VVVVVK Excel Programming 1 August 25th 06 11:59 AM
Exception from HRESULT: 0x800A03EC nano2k New Users to Excel 0 July 21st 06 12:15 PM
Exception from HRESULT: 0x800A03EC. at Microsoft.Office.Interop.Excel.WorkbookClass.get_VBProject() [email protected] Excel Programming 0 April 11th 06 04:40 PM
Excel SaveCopyAs COMException 0x800A03EC Jim McLeod Excel Programming 0 May 25th 04 12:26 AM
Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. Steven Excel Programming 1 November 5th 03 06:59 PM


All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"