Gerard Garreau
Posts: 4
Joined: 2006-09-20
|
Hi,
I have develop an Excel add-in using:
Delphi 2006 win32
Latest version of Add-in Express
The environment is Windows XP prof., Excel 2003 SP2.
The problem is that on some workstation, I have an error message:
HealthData error: the add-in has fired an exception Old format or invalid type library
Now I check various web page (Microsoft as well as this one) and that error seems to be related to .NET and it's handling of Globalization. And on some stations, changing the Regional settings from Canada to US does indeed make the error message appear or not (Canada: error, US:no error). But on some other, the regional settings seems irrelevant. Not that all workstation have similar set-up (windows, office)
Any ideas as to where to start looking?
Gerard Garreau
Novelis Inc.
:?: |
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Gerard,
Could you please show me the line of your code that raises the exception?
|
|
Gerard Garreau
Posts: 4
Joined: 2006-09-20
|
Hi,
The problem is that on my station (for reasons that remain unknown) the error does not occur. however, I found my problem. In the line
wb:=ExcelApp.Workbooks.Open(xlsname,...,0);
where 0 is the lcid. I replace with
lci:=GetUserDefaultLCID;
and
wb:=ExcelApp.Workbooks.Open(xlsname,...,lci);
It now seems to work on most workstation. However, I thought that this was a .NET thing. I'm using win32. Maybe Excel 2003 has some .NET code in it.
Thanks
Gerard Garreau |
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Gerard,
It now seems to work on most workstation. However, I thought that this was a .NET thing. I'm using win32. Maybe Excel 2003 has some .NET code in it.
I did expect something like LCID. The point is that .NET developers face LCID more often, and I think that is why you found .NET related web pages and articles.
|
|