Excel error HRESULT: 0x800A03EC while trying to get range with cell's name

Posted by Teerasej on Stack Overflow See other posts from Stack Overflow or by Teerasej
Published on 2009-05-21T04:28:42Z Indexed on 2010/05/20 17:40 UTC
Read the original article Hit count: 614

Filed under:
|
|
|

I am working with Window Service project. that have to write data to a sheet in Excel file in a sequence times.

But sometimes, just sometimes, the service throw out the exception "Exception from HRESULT: 0x800A03EC" while it's trying to get range with cell's name.

I have put the code of opening excel sheet, and getting cell here.

OS: window server 2003

Office: Microsoft Office 2003 sp2

1: Opening excel sheet

m_WorkBook = m_WorkBooks.Open(this.FilePath, 0, false, 5, "", "", true, Excels.XlPlatform.xlWindows, ";", true, false, 0, true, 0, 0);

2: Getting cell to write

protected object m_MissingValue = System.Reflection.Missing.Value;

Range range = m_WorkSheet.get_Range(cell.CellName, m_MissingValue); // error from this method, and cell name is string.

© Stack Overflow or respective owner

Related posts about excel

Related posts about exception