HRESULT: 0x800A03EC on Worksheet.range

前端 未结 23 2457
Happy的楠姐
Happy的楠姐 2020-11-22 07:42

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

Code:

Microsoft.Office.Interop.Excel.Range         


        
23条回答
  •  Happy的楠姐
    2020-11-22 08:18

    I agree with Hugh W post "I conclude that the same error code is used to indicate multiple unrelated problems"

    Other posts have not mentioned that this error occurs frequently if the worksheet is locked. While I haven't tested every scenario, it seems that anything that you can not do in excel when a worksheet is locked with throw this error if you attempt to do it via VSTO/Com while the sheet is locked. E.G. Changing any style artifact (font, font size, colour, underline), changing the Excel Validation, changing the column widths, row heights, formulas

提交回复
热议问题