VB 打开EXCEL2007 密码

发布网友 发布时间:2022-04-23 02:41

我来回答

1个回答

热心网友 时间:2023-05-18 12:38

Function UnprotectXL(filePath,fileName,pwd,writeresPwd)
Set objExcel=CreateObject("Excel.Application")
objExcel.Visible=false
testData=filePath&"\"&fileName

Set oWorkbook=objExcel.Workbooks

Set myWkbook=objExcel.Workbooks.open (testData,0,False,5,pwd,writeresPwd)
objExcel.DisplayAlerts=False
oWorkbook(fileName).Activate
For Each w in objExcel.Workbooks
w.SaveAs testData,,"",""
Next
objExcel.Workbooks.Close
objExcel.Quit
Set oWorkbook=Nothing
Set objExcel=Nothing
End Function

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com