Excel automation code fails in Chinese culture

Y

Yi

I installed MUI on my Windows XP English version system, set Standard and
Formats to "Chinese, set Language to Chinese, via Control Panel/Regional and
Language Options dialog. When I run a VB.NET(1.0) code that uses Excel
automation, it failed in the third line as shown in the below.
Dim ExcelApp as Excel.Application
ExcelApp = CreateObject("Excel.Application")
ExcelApp.Workbooks.Add()

The debug message shows a type of exception
"system.runtime.InteropServices.COMException". The debug output window shows
a message "Additional information: æ ¼å¼å¤ªæ—§æˆ–是类型库无效。(format too old or invalid
type library)".

Is it true that the file "Interop.Excel.dll" that comes with the English
version of Office XP will not work if the current culture is not English.
Should I use a Chinese version of Office XP if the culture is Chinese? Or, is
there a way to change code to make it work?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top