Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3806022
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:46:13+00:00 2026-05-19T14:46:13+00:00

When exporting data to excel via COM Interop I get an error (code 0x800A03EC)

  • 0

When exporting data to excel via COM Interop I get an error (code 0x800A03EC) when trying to set the AxisTitle.Text property. This happens ONLY on one specific computer with Windows 7 x64 Professional and Excel 2003. I’ve tried it on a variety of different PCs (incuding Win7 x64 Professional + Excel 2003) but can’t reproduce that error on any other machine.

private static void setAxisTitle(_Chart tChart, string aszTimeUnit)
    {
        Axis tAxis = (Axis)tChart.Axes(XlAxisType.xlValue, XlAxisGroup.xlPrimary);
        try
        {
            tAxis.HasTitle = true;
            tAxis.AxisTitle.Text = "Messwert [um/m]";
            tAxis = (Axis)tChart.Axes(XlAxisType.xlCategory, XlAxisGroup.xlPrimary);
            tAxis.HasTitle = true;
            tAxis.AxisTitle.Text = string.Format("Zeit [{0}]", aszTimeUnit);
        }
        catch (Exception aEx)
        {
            cLogger.ErrorFormat("error setting axis title for time unit '{0}' on Axis '{1}'", aszTimeUnit, tAxis.AxisTitle);
            cLogger.Error("error stack trace:", aEx);
            throw;
        }
    }

Someone got any idea how to solve this dilemma?

EDIT:
On the topic of differing cultures:
Both OS and Excel have the same culture.
HOWEVER, I (think I) do handle any problems that may arise from this with the following code:

 static Excel2007Export()
    {
        Microsoft.Office.Interop.Excel.Application tExcel = new Application();
        cSystemCulture = Thread.CurrentThread.CurrentCulture;
        cExcelCulture = new CultureInfo(tExcel.LanguageSettings.get_LanguageID(
            Microsoft.Office.Core.MsoAppLanguageID.msoLanguageIDUI));

        try
        {
            Thread.CurrentThread.CurrentCulture = cExcelCulture;
            int tVersion;
            bool tParseSucceded = Int32.TryParse(tExcel.Version.Substring(0, tExcel.Version.IndexOf('.')), out tVersion);

            // 12 is the first version with .xlsx extension
            if (tVersion >= 12)
                cDefaultExtension = ".xlsx";
            else
                cDefaultExtension = ".xls";

        }
        catch (Exception aException)
        {
            cLogger.Debug("error retrieving excel version.", aException);
            cLogger.Error("error retrieving excel version.");
        }
        finally
        {
            Thread.CurrentThread.CurrentCulture = cSystemCulture;
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T14:46:13+00:00Added an answer on May 19, 2026 at 2:46 pm

    This error sometimes happen when the calling process has a different culture in respect to the office installation. If this is your case you can change the calling thread culture to match the Excel culture like this:

    CultureInfo MyCulture = new CultureInfo(“en-US”); // your culture here
    Thread.CurrentThread.CurrentCulture = MyCulture;

    This could possibly fix the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.