Thanks Steve and all other trying to solve my problem.
I've found what it was. The problem was in the client Regional settings for
windows. I had to put in the code:
Dim oApp As New Excel.Application()
Dim oldCI As System.Globalization.CultureInfo = _
System.Threading.Thread.CurrentThread.CurrentCultu re
System.Threading.Thread.CurrentThread.CurrentCultu re = _
New System.Globalization.CultureInfo("en-US")
oApp.Workbooks.Add()
System.Threading.Thread.CurrentThread.CurrentCultu re = oldCI
as described in KB320369.
http://support.microsoft.com/default...EN-US;Q320369&
Thanks again, Micke.
"Steve C. Orr [MVP, MCSD]" wrote:
> This article contains the information you need to work with Excel files from
> ASP.NET:
> http://www.aspnetpro.com/NewsletterA...200309so_l.asp
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
>
>
> "Micke" <> wrote in message
> news:2046171D-3619-4D31-A062-...
> > Hi,
> > I'm trying to open an Excel file from an aspx with following code:
> >
> > Imports Excel = Microsoft.Office.Interop.Excel
> >
> > Dim oExcel As New Excel.Application
> > Dim oBooks As Excel.Workbooks
> > oBooks.Open("C:\XML\PriceList.xls")
> >
> > All I get is:
> > System.Runtime.InteropServices.COMException: Old format or invalid type
> > library.
> >
> > Can anyone tell me what I'm doing wrong.
> > Thanks, Micke
>
>
>