打印本文 打印本文  关闭窗口 关闭窗口  
如何用程序实现链接有“打开密码”的EXCEL表格
作者:佚名  文章来源:不详  点击数  更新时间:2008/4/18 16:10:34  文章录入:杜斌  责任编辑:杜斌

方法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

打印本文 打印本文  关闭窗口 关闭窗口