Exception from HRESULT: 0x800A03EC during Excel 2007 operation

    일반 토론

  • Hello all,

    I have a weird situation that I cannot figure out. The code below iterates through all of the worksheets in a workbook (Excel 2007) and takes the sheet name and a link to a particular cell on each sheet. On all my tests everything works perfectly, until the workbook has too many sheets (haven't figured out what the magic number is yet - 20 seems fine.) If there are too many sheets (at least, that is the only thing that I have isolated it down to) then I get an Exception from HRESULT: 0x800A03EC thrown. Any ideas on what is causing this and how to get around it?


    Excel.Worksheet tmpSheet;
    (q=2; q<total;q++)
    tmpSheet = (Excel.

    tmpSheetname = "='" + tmpSheet.Name + "'!D40";

    cell = "B" + (q+8).ToString();

    SummarySheet.get_Range(cell, cell).Value2 = tmpSheetname;

    cell = "A" + (q + 8).ToString();

    SummarySheet.get_Range(cell, cell).Value2 = tmpSheet.get_Range("D9", "D9").Value2.ToString().Remove(0, 15);


    • 이동됨 David DoBell 2008년 7월 10일 목요일 오후 8:59 Post is not related to Microsoft Interoperability
    2008년 7월 10일 목요일 오후 6:49

모든 응답