HRESULT: 0x800A03EC on Worksheet.range

前端 未结 23 2118
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条回答
  •  囚心锁ツ
    2020-11-22 08:07

    For others like me, who have the same exception:

    It can also happen if you try to pass a null value instead of Missing.Value (or Type.Missing)

    e.g.

    Worksheet worksheet = ...;
    return worksheet.Range["A1", null]; //This call generates the error 0x800A03EC
    
    return worksheet.Range["A1", Missing.Value]; //This works correctly
    

提交回复
热议问题