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!! 7 1186
"jessi" <am****@cyc.eswrote in message
news:OW**************@TK2MSFTNGP03.phx.gbl...
>
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
BUG: "Old format or invalid type library" error when automating Excel http://support.microsoft.com/kb/320369
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")
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>
"jessi" <am****@cyc.eswrote in message
news:OW**************@TK2MSFTNGP03.phx.gbl...
>Hello,
>Dim oExcel As Excel.Application
Excel, as with the rest of Office, is not designed for server-side
automation. Microsoft strongly disadvises this, and won't actually support
any application which uses it: http://support.microsoft.com/default...US;q257757#kb2
Use this instead: http://www.aspose.com/Products/Aspos...s/Default.aspx
"jessi" <am****@cyc.eswrote in message
news:u$**************@TK2MSFTNGP02.phx.gbl...
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")
You'll be *very* fortunate indeed if this works in a live production
environment...
It almost certainly won't...
Why?
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:Ow**************@TK2MSFTNGP03.phx.gbl...
>
"jessi" <am****@cyc.eswrote in message
news:u$**************@TK2MSFTNGP02.phx.gbl...
>Solution:
System.Threading.Thread.CurrentThread.CurrentCult ure = System.Globalization.CultureInfo.CreateSpecificCu lture("en-Us")
Dim oExcel As Excel.Application
oExcel = New Excel.Application
Dim oWorkbook As Excel.Workbook
oWorkbook = oExcel.Workbooks.Open(Filename:=Request.ServerVar iables("APPL_PHYSICAL_PATH") & "otrapruebamas.xls")
You'll be *very* fortunate indeed if this works in a live production
environment...
It almost certainly won't...
"jessi" <am****@cyc.eswrote in message
news:eP**************@TK2MSFTNGP06.phx.gbl...
Why?
For precisely the reasons outlined by Microsoft in the link that I gave you
in my first reply...
Is there any particular reason why you didn't read it...???
Jessi.
Mark is trying to help you, by giving you a article about ~why not to do
this.
Instead of asking "why", try reading the article.... and then if you need to
ask specific questions about the the article, then do so.
But put a little legwork in...esp when someone is trying to ~help you avoid
a pitfall.
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:ex**************@TK2MSFTNGP03.phx.gbl...
"jessi" <am****@cyc.eswrote in message
news:eP**************@TK2MSFTNGP06.phx.gbl...
Why?
For precisely the reasons outlined by Microsoft in the link that I gave
you
in my first reply...
Is there any particular reason why you didn't read it...???
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Allison Bailey |
last post by:
Hi Folks,
I'm a brand new Python programmer, so please point me in the right
direction if this is not the best forum for this question....
I would like to open an existing MS Excel spreadsheet...
|
by: Vikram |
last post by:
Hi,
Given below is my task.
An user can open the xls file from my website (loaded on the top frame).
After filling the Excel, he can click a send button at the bottom frame. By
clicking the...
|
by: Lize |
last post by:
Hi,
I'm writing an ASP application to open an excel workbook, then run a
macro stored in the excel file, which produces outputs that will be
displayed back onto my ASP application.
Now the...
|
by: Otie |
last post by:
I found the following under the GetObject help notes and in the
example for GetObject:
"This example uses the GetObject function to get a reference to a
specific Microsoft Excel worksheet...
|
by: mail2atulmehta |
last post by:
Hi,
I do not know if this is right place for this, but i need some help. I
have a text file, whose values are seprated by a delimiter. I want to
open this file in excel, ( not import it) . I have...
|
by: Jae |
last post by:
I'm writing a web application that exports and imports excel files.
The application gets a list of users and their info and displays it in
a datagrid .The user then selects to save the file as a...
|
by: Mad Scientist Jr |
last post by:
>From an asp.net web page I want the user to open the results of a SQL
query in Excel, as automatically as possible (ie not having to loop
through columns, rows, in code).
For this,...
|
by: alexia.bee |
last post by:
Hi all,
In some weird reason, excel instance won;t die if i remove the comment
from 4 lines of setting values into struct.
here is a snipcode
public...
|
by: roswara |
last post by:
Dear all,
Currently, I am working on a project to make a web-based application using ASP 2.0 and C#. This application will ask user to input for an excel file which has graphs in it. Then the...
|
by: =?Utf-8?B?YzY3NjIyOA==?= |
last post by:
Hi all,
I have a question for you.
I have a .csv file which has many lines of data.
Each line has many data fields which are delimited by ",".
Now I need to extract part of data from this...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |