JulienVan
asked on
How to avoid COMException when getting value of an Excel 2007 cell?
Hello,
I'm developing an add-in for Excel 2007 with Visual Studio 2005, and I don't have any errors when I use it on my machine, but I'm getting following errors on another computer:
This error occurs when getting value of a cell:
Would you have any idea about the origin of the problem and how to solve it?
Many thanks,
Julien
I'm developing an add-in for Excel 2007 with Visual Studio 2005, and I don't have any errors when I use it on my machine, but I'm getting following errors on another computer:
This error occurs when getting value of a cell:
Excel.Range rng = sheet.Cells[headidx, icol] as Excel.Range;
if (rng != null)
{
object val = rng.get_Value(oMissing);
}
Would you have any idea about the origin of the problem and how to solve it?
Many thanks,
Julien
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"Old Format or Invalid Type Library Error
A second issue that further complicates the Excel locale issue is that you can get an "Old format or invalid type library" error when using the Excel object model in an English Excel installation on a machine where the locale is set to a non-English locale. Excel is looking for a file called xllex.dll in Program Files\Microsoft Office\OFFICE11\1033 that it cannot find. The solution to this problem is to install the xllex.dll file or install the MUI language packs for Office. You can also make a copy of excel.exe, rename it to xllex.dll, and copy it to the 1033 directory."
The origin of the problem might be that my system is not in english but my Office software is, I'm going to check it...