Discuz!NT
欢迎 游客 , 注册 | 登录 | 会员 | 界面 | 简洁版本 | 在线 | 帮助
商都网教育宝典宝库

发表新主题 回复该主题
本主题被查看468次, 共1个帖子, 1页, 当前为第1页     选择页数: 1      跳转到第   上一主题   下一主题
标题: 如何用程序实现链接有“打开密码”的EXCEL表格
-[尕硴]
超级版主
UID: 71
来自:
精华: 130
积分: 14003
帖子: 12909
注册: 2007-10-22 17:59:00
状态: 离线
威望: 444.00
金钱: 3355.00 元
只看楼主 2008-04-11 14:35
如何用程序实现链接有“打开密码”的EXCEL表格
方法1:
MyXL.Workbooks.Open Filename:=strFileName, Password:=strPassword

方法2:
Dim oExcel As Excel.Application
Dim oBook As Excel.Workbook
Set oExcel = New Excel.Application
oExcel.Visible = True

Set oBook = oExcel.Workbooks.Open _
(FileName:="C:\Test\xxx.xls", _
ReadOnly:=True, _
Password:="secret")

Set oBook = Nothing
Set oExcel = Nothing
#1  
发表新主题 回复该主题
本主题被查看468次, 共1个帖子, 1页, 当前为第1页     选择页数: 1      跳转到第







现在的时间是 2008-07-25 23:35:49

版权所有 商都网教育宝典
         Powered by Discuz!NT 1.0.6666    Copyright © 2001-2008 Comsenz Inc.
Processed in 0.064 seconds