The associated COM server does not support ActiveX Document embedding
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的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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: ...
- 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 ...
- <<< Tomcat运行提示The server does not support version 3.0
导入了一个项目,运行Tomcat出现此错误大致由于当前导入项目服务器不支持J2ee版本 原因是导入项目的Tomcat版本是6.0,Tomcat 6.0仅支持到Servlet 2.5,而此时项目是3.0 ...
- eclipse部署Tomcat6 : The server does not support version 3.0 of the JEE Web module specification
为项目添加tomcat 6,发现不能添加,原因如下 这是因为Tomcat6不能为JavaEE3.0版本服务,把项目的版本降低到2.5就可以了 现在可以部署了
- How to deal with "Could not find component on update server. Contact VMware Support or your system administrator." in Vmware.
手动将vmware安装目录下的vmtools镜像文件,windows.iso文件放到虚拟机的光区里. 再进入虚拟机的系统,在系统里打开光盘进行安装
随机推荐
- 【Vim】Vim学习
1. 三种模式 (1)命令模式:刚启动vim便进入命令模式,此时敲击键盘会被当做命令来处理 以下是常用的几个命令: i 切换到插入模式,以输入字符.x 删除当前光标所在处的字符.: 切换到底线命令模式 ...
- CentOS7安装virtualbox
1.进入virtualbox官网 https://www.virtualbox.org/ 2.点击download 3.点击Linux distributions 4.向下翻至如图,并且进入同种框选页 ...
- linux MD5 SHA1 等 文件校验方法
为解决官方发布的软件包被别人更改或者软件在传输过程中出现传输错误等问题,软件官方在提供软件包的同时,还提供一个保存MD5校验码的文件. Linux/unix中可以使用 md5sum 文件名 sha1s ...
- redis的key
Redis支持的数据模型: Redis支持的数据类型: redis的key: Redis对key的操作: 执行命令cd /usr/local/redis进入到redis的启动目录,执行./redis ...
- select2 使用教程
用了这么久的Select2插件,也该写篇文章总结总结.当初感觉Select2不是特别好用,但又找不到比它更好的下拉框插件. 在我的印象里Select2有2个版本,最新版本有一些新的特性,并且更新了一下 ...
- 去除inline-block之间的空白
做一个水平排列的导航通常有以下几种布局: 1.给一个浮动. 2.设置display为inline. 3.设置display为inline-block. 但要追求代码量最少的话,设置为inline元素或 ...
- OC基础之访问修饰符
做C#.Java的人都知道private.protect.public这些访问权限,在OC中看项目基本都没用到这些,昨天就好奇的仔细了解了下,其实OC中也是有这些访问权限的修饰.说实话有好多做过编程的 ...
- mac terminal中快捷移动光标 持续更新。。。
1.option + ←/→ 以单词为单位快速移动 2.ctrl + A 移动到行首 3.ctrl + B 移动到行尾 4.ctrl + K 删除光标后至行尾的内容
- nodejs添加jsonwebtoken验证
具体使用模块: 使用compression压缩处理请求响应.cors模块添加跨域.helmet安全模块.body-parser解析请求参数.jsonwebtoken用于生成及校验token.使用内置c ...
- Spring-在IDEA2016中创建maven管理的SpringMVC项目
这是一套我自己摸索出来的创建项目方法,基本是用在创建用maven管理的 Spring+SpringMVC+Mybatis的J2EE项目时. 创建一个maven管理的webapp项目 在创建项目时,选择 ...