Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to open worksheet but it gives me the following error. This error
dosent occur every time. Its random. That's why I have put my code in try block. System.Runtime.InteropServices.COMException (0x8002801D): Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) at Microsoft.Office.Interop.Excel.Sheets.get__Default (Object Index) Following is my code snippet private void PasteData(string sSheet) { try { /* Open the corresponding sheet in the WorkSheet */ xlSheetScript = (Excel.Worksheet)xlBookScript.Worksheets[sSheet]; /* Find the last row in that sheet */ for (iCount = 400; iCount 0; iCount--) { xlRange = (Excel.Range)xlSheetScript.Cells[iCount, 2]; if (xlRange.Value2 != null) { break; } } Any help will be greatly appreciated. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
unable to view all open excel worksheet from window | Excel Discussion (Misc queries) | |||
workbook_open not being called when I open the excel file | Excel Programming | |||
When I open a workbook, another one called Book1 is also opened. W | Excel Discussion (Misc queries) | |||
function called from worksheet and bad result! | Excel Programming | |||
Unable to get the NormDist of the Worksheet Function | Excel Programming |