Alex Rivera | Logout

HRESULT: 0x800A03EC on Worksheet.range

Asked 2011-08-17T21:31:50.610
31

I am getting HRESULT: 0x800A03EC on Worksheet.range method. Number of rows are more than 70K. Office 2007.

Code:

Microsoft.Office.Interop.Excel.Range neededRange
    = currentWS.Range[cell.Cells[1, 1], cell.Cells[nRowCount, nColumnCount]];

Here my rowcount is more than 65530 . Breaks on this function. I have observed that it breaks only when row count goes more than 65530.

Edit
Report

1 Answer

2

Simply, the excel file is corrupt. Best solution is change/repair the file.(make a copy of the existing file and rename it)

answered 2012-10-23T05:17:11.933

Your Answer