The associated COM server does not support ActiveX Document embedding

通过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"

  <SCRIPT language="javascript" event="NotifyCtrlReady" for="FramerControl1">
        function OpenHelpDoc()
        {
            document.all.FramerControl1.Open("../photofile/<%=Request.QueryString["FilePath"] %>", true,"Word.Document");
        }
        OpenHelpDoc();
    </SCRIPT>
时间: 2024-10-29 00:28:54

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 + Tomcat6,run到Tomcat6时报这个版本支持问题. 2.原因: Tomcate6最多支持Servlet 2.5的,但是现在的项目是3.0, 所以要降低项目的版本 3.解决 在项目的根目录下有个.settings 文件夹,找org.eclipse.wst.common.project.facet.core.xml文件. 把  <installed facet="jst.web" version="3.0"/> 改成

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-hellman-group1-sha1 forkeyexchange 解决方案:[亲测有效] 1.打开 sudo vim /etc/ssh/sshd_config 2.在最后添加 KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecd

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

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

3 Ways to Generate vCenter Support Bundle in vCenter Server Appliance

1.Generate vCenter Support Bundle using Web Browser a.Log into any Windows machine on which you want to download the vCenter Support bundle. b. Open any web browser such as Internet Explorer or Google Chrome and navigate to the below URL https://vCen

SQL Server on Linux: How? Introduction: SQL Server Blog

SQL Server Blog Official News from Microsoft's Information Platform https://blogs.technet.microsoft.com/dataplatforminsider/2016/12/16/sql-server-on-linux-how-introduction/ This post was authored by Scott Konersmann, Partner Engineering Manager, SQL

How to enable TLS 1.2 on Windows Server 2008 R2

Problem How to enable TLS 1.2 on Windows Server 2008 R2? Resolution QuoVadis recommends enabling and using the TLS 1.2 protocol on your server.  TLS 1.2 has improvements over previous versions of the TLS and SSL protocol which will improve your level

Skype for Business Server 2015-03-后端服务器-0-准备

申明:文章中部分内容有涉及官方帮助或者网上资源整合,如有违权,请速与作者联系,谢谢! 作者:[email protected] 培训:Skype for Business Server 2015-项目实战-培训-QQ群:65235615.(学员群,非所有人员都加.) 1. 规划-拓朴图 2. 规划-服务器 3. 准备-软件 Sql Server 2014: cn_sql_server_2014_enterprise_edition_x64_dvd_3932882.iso Sql Server 2

SQL Server 得到SPID,唯一的sessionID

像.net中的session一样,如果能知道了数据库中的sessionID,那所有的操作都能知道了,因为有了这个唯一的身份识别的标识. 可以做的事情有很多,如:当前哪个用户在做什么操作,在执行什么sql, 又如一个比较大的逻辑中要分别执行很多存储过程, 在执行这些存储过程的过程当中,你想知道当前执行的进度,SQLServer正在执行哪个段sql语句,那么通过sessionID是很容易 就得到这些信息的. SQL Server 得到SPID,唯一的sessionID: SELECT @@SPID

APNS push server端 SSL3.0 转 TLS (iPhone苹果推送服务)

(转载此文,请说明原文出处) 苹果的官方公布 Update to the Apple Push Notification Service October 22, 2014 The Apple Push Notification service will be updated and changes to your servers may be required to remain compatible. In order to protect our users against a recent