Foxtable(狐表)用户栏目专家坐堂 → SaveToPdf 错误


  共有2850人关注过本帖树形打印复制链接

主题:SaveToPdf 错误

帅哥哟,离线,有人找我吗?
有点甜
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/27 9:12:00 [只看该作者]

1、

 

http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=54396&replyID=360697&skin=1

 

2、如果1无法修复,就重新安装一下wps。

 

3、如果1、2都无法修复,那就安装下面这个 http://dl.pconline.com.cn/html_2/1/82/id=8870&pn=0.html

 


 回到顶部
帅哥哟,离线,有人找我吗?
Grandraw
  12楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:92 积分:1027 威望:0 精华:0 注册:2018/5/31 19:09:00
  发帖心情 Post By:2018/9/27 9:19:00 [只看该作者]

感谢版主的答复。不过上面的做法没什么帮助,因为公司电脑不可能让我们装盗版的。

不过这个问题我似乎找到了答案,供你们参考:
https://support.microsoft.com/en-us/help/320369/bug-old-format-or-invalid-type-library-error-when-automating-excel

Cause

You receive this error calling an Excel method when the following conditions are true: 
  • The method requires an LCID (locale identifier).
  • You run an English version of Excel. However, the regional settings for the computer are configured for a non-English language.
If the client computer runs the English version of Excel and the locale for the current user is configured for a language other than English, Excel will try to locate the language pack for the configured language. If the language pack is not found, the error is reported.

上面是微软的网站说的,运行英文版excel和采用LCID就会造成这个错误。我给的链接里有解决办法。





 回到顶部
帅哥哟,离线,有人找我吗?
Grandraw
  13楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:92 积分:1027 威望:0 精华:0 注册:2018/5/31 19:09:00
  发帖心情 Post By:2018/9/27 9:27:00 [只看该作者]

下面是微软建议的解决办法,任何一种均可以。建议你们把代码加入你们的程序中,这样就可以避免这个问题再次出现。我这边先试着按微软说的安装多语言支持包。

To work around this problem, you can use one of the following methods:
  • Install the Multilingual User Interface Pack for your version of Office.
  • Execute the Excel method or property by using InvokeMember so that you can specify the CultureInfo for the call. For example, the following code illustrates how you can invoke the Workbooks object Add method with "en-US" as the CultureInfo:
    Dim oApp As New Excel.Application()
    oApp.Visible = True
    oApp.UserControl = True
    Dim oBooks As Object = oApp.Workbooks
    Dim ci As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("en-US")
    oBooks.GetType().InvokeMember("Add", Reflection.BindingFlags.InvokeMethod, Nothing, oBooks, Nothing, ci)
  • Or, set the CultureInfo prior to calling the Excel method. For example:
    Dim oApp As New Excel.Application()
    oApp.Visible = True
    oApp.UserControl = True
    Dim oldCI As System.Globalization.CultureInfo = _
    System.Threading.Thread.CurrentThread.CurrentCulture
    System.Threading.Thread.CurrentThread.CurrentCulture = _
    New System.Globalization.CultureInfo("en-US")
    oApp.Workbooks.Add()
    System.Threading.Thread.CurrentThread.CurrentCulture = oldCI
  • Create a 1033 directory under Microsoft Office\Office11. Then, copy excel.exe to the 1033 directory, and rename it as xllex.dll. 

    For more information, click the following link:
    http://blogs.msdn.com/eric_carter/archive/2005/06/15/429515.aspx

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  14楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/27 9:37:00 [只看该作者]

如果你之前安装过wps,请重新安装一下wps;

 

如果所有确实无法修复,那就安装下面这个测试 http://dl.pconline.com.cn/html_2/1/82/id=8870&pn=0.html


 回到顶部
帅哥哟,离线,有人找我吗?
Grandraw
  15楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:92 积分:1027 威望:0 精华:0 注册:2018/5/31 19:09:00
  发帖心情 Post By:2018/9/27 9:44:00 [只看该作者]

感谢版主关注。没装过wps。

我刚才按照微软的方法安装office多语言支持包, 问题完美解决。代码测试通过。

总结经验供同行参考:

1. 本帖第一楼的错误是由于安装64位版本的office造成的。故需换装32位版本的。

2. 安装32位版本后,得到第二三楼的错误提示,据微软网站说这是英文版excel造成的,(可能Foxtable程序开发时针对的是中文excel),安装多语言支持包(中文)。问题完美解决。



 回到顶部
总数 15 上一页 1 2