HRESULT: 0x800A03EC on Worksheet.range

前端 未结 23 2182
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:20

    I've come across it several different times and every time it was always some error with either duplicating a tab name or in this current case it just occurred because I simply had a typo in the get_Range where I tried to get a Cell by number and number instead of the letter and number.
    Drove me crazy because the error pointed me to a few lines down but I had commented out all of the creation of the other sheets above the "error line" and the ones in the line and below were created with no issue.
    Happened to scan up a few lines above and saw that I put 6 + lastword, C + lastrow in my get_Range statement and of course you can't have a cell starting with a number it's always letter than number.

提交回复
热议问题