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.