Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found a possible solution here: <a href="http://www.made4dotnet.com/Default.aspx?tabid=141&amp;aid=15" rel="nofollow noreferrer">http://www.made4dotnet.com/Default.aspx?tabid=141&amp;aid=15</a></p> <p><strong>Edit:</strong></p> <p>If you automate Microsoft Excel with Microsoft Visual Basic .NET, Microsoft Visual C# .NET, or Microsoft Visual C++, you may receive the following errors when calling certain methods because the machine has the locale set to something other than US English (locale ID or LCID 1033):</p> <p>Exception from HRESULT: 0x800A03EC </p> <p>and/or</p> <p>Old format or invalid type library</p> <p>SOLUTION 1:</p> <hr> <p>To get around this error you can set CurrentCulture to en-US when executing code related to Excel and reset back to your originale by using these 2 functions.</p> <pre><code>//declare a variable to hold the CurrentCulture System.Globalization.CultureInfo oldCI; //get the old CurrenCulture and set the new, en-US void SetNewCurrentCulture() { oldCI = System.Threading.Thread.CurrentThread.CurrentCulture; System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); } //reset Current Culture back to the originale void ResetCurrentCulture() { System.Threading.Thread.CurrentThread.CurrentCulture = oldCI; } </code></pre> <p>SOLUTION 2:</p> <hr> <p>Another solution that could work, create a 1033 directory under Microsoft Office\Office11 (or your corresponding office-version), copy excel.exe to the 1033 directory, and rename it to xllex.dll.</p> <p>Although you might solve the problem using one off these solutions, when you call the Excel object model in locales other than US English, the Excel object model can act differently and your code can fail in ways you may not have thought of. For example, you might have code that sets the value of a range to a date:</p> <p>yourRange.Value2 = "10/10/09"</p> <p>Depending on the locale this code can act differently resulting in Excel putting into the range any of the following values:</p> <p>October 10, 2009 September 10, 2009 October 9, 2010</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload