zoukankan      html  css  js  c++  java
  • COMException was unhandled:Old format or invalid type library

    If you automate Microsoft Excel with Microsoft Visual Basic .NET, Microsoft Visual C# .NET, or Microsoft Visual C++, you may receive the following error when calling certain methods:

    Error: 0x80028018 (-2147647512)
    Description: Old Format or Invalid Type Library

    COMException was unhandled:Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))

    To work around this problem, you can use one of the following methods:

    • Install the Multilingual User Interface Pack for yourversion of Office.
    • Or, set the CultureInfo prior to calling the Excel method. For example:
      代码
      System.Globalization.CultureInfo CurrentCI = System.Threading.Thread.CurrentThread.CurrentCulture;
      System.Threading.Thread.CurrentThread.CurrentCulture
      = new System.Globalization.CultureInfo("en-US");
  • 相关阅读:
    b站尚硅谷MySQL笔记(婷姐初级,周阳高级)
    word--公式添加编号
    excel--长数字显示问题
    R语言--蒙特卡洛计算定积分
    数学
    数学
    Computer Science
    Computer Science
    Computer Science
    元学习
  • 原文地址:https://www.cnblogs.com/jiahello/p/1648307.html
Copyright © 2011-2022 走看看