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. redis的 list

    redis的list是一个双向链表,既可以用作栈,也可以用作队列,幸好大学学过数据结构,还有印象. 栈:先进后出,队列:先进先出 redis链表操作: 应用场景学习list链表:要获取最新的10个登录 ...

  2. linux安装使用xdebug

    我还是来给大家一个正确的配方,每个人的php版本不一样 所以下载的xdebug应该是不一样的 1,https://xdebug.org/wizard.php   进入这个网页 把自己phpinfo的信 ...

  3. PHP 中 strlen 获取中英 字符长度 以作以后对比使用

    ANSII编码: 1 长度是3 a 长度是3 ? 长度是3 我 长度是4 ?长度是2 ---------------------------- UTF-8编码: 1 长度是1 a长度是1 ? 长度是1 ...

  4. 001-Servlet模板

    package ${enclosing_package}; import java.io.IOException; import javax.servlet.ServletException; imp ...

  5. java数据结构---------插入排序的实现

    插入排序分为直接插入排序和希尔排序 插入排序 实现方法 //插入排序,按从小到大的顺序 public static void insertSort(int[] array){ int j,temp = ...

  6. PTA (Advanced Level) 1066 Root of AVL Tree

    Root of AVL Tree An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of ...

  7. 入门系列之在Ubuntu上安装Drone持续集成环境

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由小铁匠米兰的v 发表于云+社区专栏 介绍 Drone是一个流行的持续集成和交付平台.它集成了许多流行的版本控制存储库服务,如GitHu ...

  8. 发布.net 4.0的站点到IIS7.5下时无法访问

    现象: 初始发布.net 4.0站点到IIS7.5下时,各种配置都完毕的情况下依旧无法访问.首页显示站点目录结构(注:开启目录结构访问后会显示这个错误,否则会提示开启),访问次级目录提示:Handle ...

  9. SearchRequestBuilder常用方法说明

    SearchRequestBuilder常用方法说明 (1) setIndices(String... indices):上文中描述过,参数可为一个或多个字符串,表示要进行检索的index: (2) ...

  10. SQL Server 导入excel时“该值违反了该列的完整性约束”错误

    SQL Server 导入excel时“该值违反了该列的完整性约束”错误 这个问题看似高大上,仔细分析了一下,ID列怎么会有重复呢? 原来是有很多空行呀!!! 所以导入excel时一定要注意空行的问题 ...