Exception from HRESULT: 0x800AC472 RRS feed

  • Question

  • Hi 

    I attempt to load excel work sheet data into data grid view.

    But during the program running 

    System.Runtime.InteropServices.COMException: 'Exception from HRESULT: 0x800AC472' error occurs below location.

    // Get the used range.
           Excel.Range used_range = sheet.UsedRange;

    Please help me to solve the problem


    Tuesday, December 31, 2019 8:34 PM

All replies

  • Hi,

     Excel.Range used_range = sheet.UsedRange;
    I'm not sure how the variable "Excel" is defined.
    I suppose it would be like this:
    Excel.Sheet(1).Range("user_range") = sheet.UsedRange;


    Ashidacchi --

    Wednesday, January 1, 2020 6:45 AM