Excel Workbook File Reading

asn1981

Active member
Joined
Mar 15, 2005
Messages
38
Programming Experience
Beginner
Hi
I need to be able to read an excel document from my vb.net aspx page.
I have searched around the internet and it seems i need to create an Excel.Application object
I have set a reference to the com excel 11 object

however i am having no luck as it says Excel.Application is not defined
would any1 know how to access data from an Excel file?
 
Don Delegate said:
How did you do this?
website -> add reference -> com -> microsoft excel 11.0 object library
i have the pia's installed
any idea how to get read an excel file with asp.net?
 
Last edited:
further to this i have just been informed that the version of excel is 2000 for which no PIA exist
therefore does any1 know of any other way to open and read an excel workbook with this version of excel
 
1) You can probably use late binding (set Option Strict Off). I'm not sure about possible security/access issues on the webserver though.
2) Add a reference to the Excel 2000 Com type library on the server and let VS do the import and generate an new interop assembly? Use this local copy.
3) Use ADO.NET as I mentioned before.

I have no experience with the first 2, and don't know if they will work or not.
 
you will probably need to configure the webserver using the dcomcnfg snap-in under DCOM Config to grant launch, activiation, access and configuration permissions to your ASP.NET user (or whatever user you are running your asp.net application under) or else your application will fail to load the Excel application.
 
Back
Top