![]() |
Excel File
Hello, I need to open an excel Workboot from an existing excel file, but I get the following error: Old format or invalid type library Here is my code: Dim oExcel As Excel.Application oExcel = New Excel.Application Dim oWorkbook As Excel.Workbook oWorkbook = oExcel.Workbooks.Open(Filename:=Request.ServerVari ables("APPL_PHYSICAL_PATH") & "otrapruebamas.xls") 'This line generates the exception Dim x As String = oWorkbook.Worksheets(1).Range("A1").Value I need help, thanks!! |
Excel File
Is this supposed to be in VBA or ASP ?
Or one of the .Net languages ? It's not valid VBA. NickHK "jessi" wrote in message ... Hello, I need to open an excel Workboot from an existing excel file, but I get the following error: Old format or invalid type library Here is my code: Dim oExcel As Excel.Application oExcel = New Excel.Application Dim oWorkbook As Excel.Workbook oWorkbook = oExcel.Workbooks.Open(Filename:=Request.ServerVari ables("APPL_PHYSICAL_PATH" ) & "otrapruebamas.xls") 'This line generates the exception Dim x As String = oWorkbook.Worksheets(1).Range("A1").Value I need help, thanks!! |
Excel File
In Asp.Net 1.1 using VB.NET "NickHK" wrote in message ... Is this supposed to be in VBA or ASP ? Or one of the .Net languages ? It's not valid VBA. NickHK "jessi" wrote in message ... Hello, I need to open an excel Workboot from an existing excel file, but I get the following error: Old format or invalid type library Here is my code: Dim oExcel As Excel.Application oExcel = New Excel.Application Dim oWorkbook As Excel.Workbook oWorkbook = oExcel.Workbooks.Open(Filename:=Request.ServerVari ables("APPL_PHYSICAL_PATH" ) & "otrapruebamas.xls") 'This line generates the exception Dim x As String = oWorkbook.Worksheets(1).Range("A1").Value I need help, thanks!! |
Excel File
You will probably get more meaningful responses in one of the groups that
deals with Interop/Net. A complete guess, but are there limitations of which versions of Excel can work with versions of the .Net framework ? NickHK "jessi" wrote in message ... In Asp.Net 1.1 using VB.NET "NickHK" wrote in message ... Is this supposed to be in VBA or ASP ? Or one of the .Net languages ? It's not valid VBA. NickHK "jessi" wrote in message ... Hello, I need to open an excel Workboot from an existing excel file, but I get the following error: Old format or invalid type library Here is my code: Dim oExcel As Excel.Application oExcel = New Excel.Application Dim oWorkbook As Excel.Workbook oWorkbook = oExcel.Workbooks.Open(Filename:=Request.ServerVari ables("APPL_PHYSICAL_PATH" ) & "otrapruebamas.xls") 'This line generates the exception Dim x As String = oWorkbook.Worksheets(1).Range("A1").Value I need help, thanks!! |
Excel File
Solution: System.Threading.Thread.CurrentThread.CurrentCultu re = System.Globalization.CultureInfo.CreateSpecificCul ture("en-Us") Dim oExcel As Excel.Application oExcel = New Excel.Application Dim oWorkbook As Excel.Workbook oWorkbook = oExcel.Workbooks.Open(Filename:=Request.ServerVari ables("APPL_PHYSICAL_PATH") & "otrapruebamas.xls") Dim x As String = oWorkbook.Worksheets(1).Range("A2").Value "NickHK" wrote in message ... You will probably get more meaningful responses in one of the groups that deals with Interop/Net. A complete guess, but are there limitations of which versions of Excel can work with versions of the .Net framework ? NickHK "jessi" wrote in message ... In Asp.Net 1.1 using VB.NET "NickHK" wrote in message ... Is this supposed to be in VBA or ASP ? Or one of the .Net languages ? It's not valid VBA. NickHK "jessi" wrote in message ... Hello, I need to open an excel Workboot from an existing excel file, but I get the following error: Old format or invalid type library Here is my code: Dim oExcel As Excel.Application oExcel = New Excel.Application Dim oWorkbook As Excel.Workbook oWorkbook = oExcel.Workbooks.Open(Filename:=Request.ServerVari ables("APPL_PHYSICAL_PATH" ) & "otrapruebamas.xls") 'This line generates the exception Dim x As String = oWorkbook.Worksheets(1).Range("A1").Value I need help, thanks!! |
All times are GMT +1. The time now is 01:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com