I tried Data Mining Add-Ins for Office 2007 - CTP December 2006.
Test settings: Windows XP SP2 english with Italian regional settings, Office 2007 english (RTM), SQL Server 2005 Developer (with SP2 CTP Dec06) and Data Mining Add-ins for Office 2007 (CTP Dec06).
If I keep regional settings in Italian, I get error like this:
Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
If I change regional settings to English, the Add-in works.
I found this description as the possible cause of the problem: http://msdn2.microsoft.com/en-us/library/ms178780(vs.80).aspx - if this is the issue, it would be necessary to change the ExcelLocale1033Attribute on the component.
Is there another workaround other than to install the Office 2007 MUI?
Marco Russo
http://www.sqlbi.eu
http://www.sqljunkies.com/weblog/sqlbi
Hello, Marco
Thank you for letting us know about this. Are you using a localized version of the add-ins? We fixed these problems for the final version of the add-ins. To make sure our fix covers all the situations, could you please tell us which task generated this error? Dos this happen all the time, with any task? Or only for certain tasks?
|||
I think there is still something to change - now I have different results on different machines.
PC 1 - addin gives error with the following configuration, it works if I change regional settings to English
Windows XP SP2 english|||
Thanks a lot, Marco. One more question: are you using English or italian Office? Same for add-ins. Sorry if this is already mentioned above, I did not find it
|||
I forgot to mention it.
In both PC1 and PC2 I have the English version of Windows (XP and 2003) and Office 2007. I have the add-in in English too. The only "localization" is the Regional Settings that I put to Italian on both machines. It is strange to me that the two PCs behaves differently, I was not aware of differences between XP and Server 2003, but may be there is something I am missing...
Let me know if you need other info.
Marco
|||Can you check "Add/Remove Programs" on the computer where you get the error and make sure that you have only one version of the DM Add-ins installed?|||Yes, I have only one: Microsoft SQL Server 2005 Data Mining Add-Ins for Office 2007 (CTP)
Marco
|||Did you have previous version of the add-ins installed on the machine where you have problem?
I think this is some problem with setup since add-ins work on one machine and don't work on another machine.
Can you try uninstalling add-ins on the machine where you have problem, then open Excel and make sure that they don't show up and then install add-ins again?
|||I made the test: I uninstalled the add-in - Excel started without any Data Mining Add-In (I checked in options dialog box too). Then I installed the DM Add-In and it still doesn't work on the XP SP2 machine. I need to change Regional Settings, as I described before.
Let me know if I can make some other test.
Marco
|||I had the same problem but with a similar application.
I wrote a C# application to manipulate Excel sheets and ran OK, but when I changed the Regional Option to Chinese, the program gives "Old format or invalid library" error. When I set the Regional Option back to English, the program runs OK again.
Regards
Jry
|||Jry,
change the current thread culture to English before manipulating Excel and reset it back when the operation is complete.
You might find the following class usuful.
Code Snippet
public class ExcelLCIDWrapper : IDisposable
{
static System.Globalization.CultureInfo enusCulture = null;
System.Globalization.CultureInfo oldCulture = null;
public ExcelLCIDWrapper(Microsoft.Office.Interop.Excel.Application excelApp)
{
if (enusCulture == null)
{
enusCulture = new System.Globalization.CultureInfo(1033);
}
if (enusCulture.Name != System.Threading.Thread.CurrentThread.CurrentCulture.Name)
{
oldCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
System.Threading.Thread.CurrentThread.CurrentCulture = enusCulture;
}
}
void IDisposable.Dispose()
{
if (oldCulture != null)
{
System.Threading.Thread.CurrentThread.CurrentCulture = oldCulture;
}
}
}
Constructor of this class sets thread culture to English and destructor resets it back. Wrap the calls to Excel that are failing inside
Code Snippet
using (ExcelLCIDWrapper wrapper = new ExcelLCIDWrapper( excelApp) )
{
...
}
Tatyana
No comments:
Post a Comment