#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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!!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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!!





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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!!









  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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!!











  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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!!















Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy 2007 excel file formula results into a 2003 Excel file Nuria Alba de Luz Excel Discussion (Misc queries) 2 July 10th 09 01:48 PM
double click excel file on the desktop excel opens but not file? JPT4266 Excel Discussion (Misc queries) 3 May 7th 09 04:24 PM
Excel 2003: doubleclick on file opens Excel window, not file. Silvy Excel Discussion (Misc queries) 2 June 29th 06 12:15 PM
ExtenXLS loads data into Excel 2002 file but damages the Excel file. [email protected] Excel Programming 1 April 28th 06 09:37 PM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM


All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"