winfrom 通过dsoframer实现读取excel文件报错:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80041103): The associated COM server does not support ActiveX Document embedding.

at DSOFramer._FramerControl.Open(Object Document, Object ReadOnly, Object ProgId, Object WebUsername, Object WebPassword)

--- End of inner exception stack trace ---

解决方法:

Open时把第三个progID加上就可以,

2.  HRESULT Open([in] VARIANT Document, [in, optional] VARIANT ReadOnly, 
[in, optional] VARIANT ProgId, [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword)
    打开文档,可以是本地文件或者是服务器文件
参数:
Document  文档路径
ReadOnly  是否已只读模式打开
ProgId    OLE类型
WebUsername  用户名(访问网络的文件时候,有可能需要)
WebPassword  密码
例子:

axFramerControl1.Open(sPath, true, "Excel.Sheet", "", "");//
DsoFramer1.Open "C:\TestBook.xls"
DsoFramer1.Open "C:\Plain.txt", , "Word.Document"  //用Word来打开c:\plain.txt文件
DsoFramer1.Open "https://secureserver/test/mytest.asp?id=123", True, "Excel.Sheet", "MyUserAccount", "MyPassword"

3.HRESULT Save([in, optional] VARIANT SaveAsDocument, [in, optional] VARIANT OverwriteExisting, 
                [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword);
保存文件在本地
DsoFramer1.Save "c:\1.doc"

The associated COM server does not support ActiveX Document embedding的更多相关文章

  1. The server does not support version 3.0 of the J2EE Web module specification

    1.错误: 在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of t ...

  2. svn 备份后双机同步热备失效,提示 W200007 target server does not support atomic revision property edits svynsync:E170009

    svn 备份后双机同步热备失效,提示 W200007 target server does not support atomic revision property edits; consider u ...

  3. The server does not support version 3.1 of the JEE Web module specification.

    使用MyEclipse2015打开MyEclipse2014编辑的项目,在服务器Tomcat 7部署时,提示"The server does not support version 3.1 ...

  4. Solution(项目部署):The server does not support version 3.0 of the J2EE Web module specification

    1.错误: 在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of t ...

  5. navicat链接阿里云mysql报80070007: SSH Tunnel: Server does not support diffie-hellman-group1-sha1 for keyexchange

      http://www.jianshu.com/p/200572ed066c navicat 链接数据库 使用navicat 的ssh通道连接数据库回遇到权限问题 错误代码如下: 80070007: ...

  6. Navicat---使用SSH远程连接到MySql,报错80070007: SSH Tunnel: Server does not support diffie-hellman-group1-sha1 for keyexchange

    尝试使用Navicat远程连接到我在阿里云服务器上的MySql,通过SSH. 但是报错: 80070007: SSH Tunnel: Server does not support diffie-he ...

  7. <<< Tomcat运行提示The server does not support version 3.0

    导入了一个项目,运行Tomcat出现此错误大致由于当前导入项目服务器不支持J2ee版本 原因是导入项目的Tomcat版本是6.0,Tomcat 6.0仅支持到Servlet 2.5,而此时项目是3.0 ...

  8. eclipse部署Tomcat6 : The server does not support version 3.0 of the JEE Web module specification

    为项目添加tomcat 6,发现不能添加,原因如下 这是因为Tomcat6不能为JavaEE3.0版本服务,把项目的版本降低到2.5就可以了 现在可以部署了

  9. How to deal with "Could not find component on update server. Contact VMware Support or your system administrator." in Vmware.

    手动将vmware安装目录下的vmtools镜像文件,windows.iso文件放到虚拟机的光区里. 再进入虚拟机的系统,在系统里打开光盘进行安装

随机推荐

  1. hibernate_annotation字段映射位置

    @Id private int id; private String name; private String wifeName; private Date birthDate; //Title是En ...

  2. java面试题汇总(一)

    1.MySQL之binlog底层原理分析:https://www.jianshu.com/p/e19d9312d1b5 2.redis持久化的几种方式https://www.cnblogs.com/A ...

  3. html5电池状态相关API

    var battery = navigator.battery || navigator.webkitBattery || navigator.mozBattery || navigator.msBa ...

  4. FocusBI:租房分析可视化(PowerBI网址体验)

    微信公众号:FocusBI关注可了解更多的商业智能.数据仓库.数据库开发.爬虫知识及沪深股市数据推送.问题或建议,请关注公众号发送消息留言;如果你觉得FocusBI对你有帮助,欢迎转发朋友圈或在文章末 ...

  5. JAVA标签

    java没有GOTO,可以通过标签实现跳转. 在 Java 里唯一需要用到标签的地方就是拥有嵌套循环,而且想中断或继续多个嵌套级别的时候. 使用位置:用在循环语句之前.----它实际需要紧靠在循环语句 ...

  6. python之virtualenv的简单使用

    什么是virtualenv? virtualenv可以创建独立Python开发环境,比如当前的全局开发环境是python3.6,现在我们有一个项目需要使用django1.3,另一个项目需要使用djan ...

  7. Java jxl导入excel文件,导入的数字、身份证号码、手机号变成了科学计数法,解决方案

    原文出自:https://blog.csdn.net/seesun2012 这是一个execl文件导入数据库操作,使用jxl解析execl导入数据库过程出现了科学计数法,与想要导入的数据不匹配,以下是 ...

  8. ashx 绝对路径得到物理路径

    //先得到模板页所在的路径 string phyPath = context.Server.MapPath("/p02style.html"); //得到模板的所有内容 strin ...

  9. protobuf简单测试应用

    protobuf是google推出的一种数据交换协议,比较适合应用于底层服务交互,nodejs提供protobufjs包的实现,下面是一个简单的测试demo: 首先是.proto文件: package ...

  10. Java基础——面向对象

    Hello 大家好,我又来啦,今天我们来说说Java的面向对象. 还记得之前去面试几家公司的实习生职位,大部分面试官都问过我有关面向对象 的问题,不知道以后还会不会问,估计是不会了吧...(:3[▓▓ ...