问题描述
我有一个需要插入数据的 xlsm 文件,但我的问题是 xlsm 受保护。我使用 oWorkbook.Protect(,.F.)
取消保护,但该功能不起作用。有什么办法可以使用foxpro取消对文件的保护吗?
oExcel = CreateObject("Excel.Application")
**checking if the excel installed into the computer
if vartype(oExcel) != "O"
MESSAGEBOX("could not instantiate Excel object.")
return .F.
ENDIF
oExcel.DisplayAlerts = .F.
oExcel.visible=.T.
**opening the data File
oWorkbook = oExcel.Application.workbooks.open(SYS(5)+SYS(2003)+"\WebADI Template\WebADI.xlsm")
**unprotect the workbook
oWorkbook.Protect(,.F.)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)