Comments (4)
似乎没有这么一个API,但是你可以通过输入一个错误的密码饶过,比如
hr, doc = app.Documents.Open(theDocPath, PasswordDocument="xxx", ReadOnly=True)
如果文档没有密码,是可以直接打开,如果有密码但是不对就会返回失败,ReadOnly=True这个只是确保万一密码对了还有一层写密码时可以只读打开,你要写的话就可能做不了了
from pywpsrpc.
如果是明确知道密码,直接用前面说的PasswordDocument参数就好了
from pywpsrpc.
好像不行啊,hr, doc = docs.Open(path, PasswordDocument="XXXX", ReadOnly=True)
,密码错误的时候不会返回失败,程序还是一直阻塞状态,UI上输入密码弹出框一直显示
from pywpsrpc.
我这里用的版本是没有问题的,如果跟文档有关的话,你自己制作个加密的文档试试?
from pywpsrpc.
Related Issues (20)
- 透视表:PivotItems()返回值错误
- 【编译】运行时依赖的Qt版本只能Qt5.12, 是哪里有限制么? 可以手动依赖Qt5.11编译么 HOT 2
- 支持QT5.14的环境吗,我把libQt5Core换成了5.14的版本 导入的时候就会报错找不到QT5.12 HOT 1
- pip/pip3 install都失败了? HOT 2
- word中公式对象OMath的方法异常 HOT 4
- ubuntu22.04-arm失败 HOT 2
- 强杀excel进程,再通过rpc调起wps进程,返回还是老对象,操作这个对象崩溃 HOT 7
- python3.9 无法正常安装库 HOT 3
- 关于etapi,如何遍历一个workbook中的所有sheet HOT 1
- rpc多进程运行报错 HOT 4
- xls,xlsx 转pdf问题 HOT 3
- 可以提供python3.12 的wheel吗? HOT 2
- HelloStar 计划
- centos7系统 下载了wps10版本 提示没有api.so文件 又下载了11版本 HOT 1
- ImportError: librpcwpsapi_sysqt5.so: cannot open shared object file: No such file or directory HOT 2
- 无法改变写入图片的宽高, InlineShape.Width = width提示 对象无效属性: 'tuple' object has no attribute 'Width' HOT 3
- 源码编译安装时,报错sip-wheel: 'make -j4' failed returning 2
- centos8下 word转PDF的会有一部分超出变成第二页
- 在银河麒麟arm64平台上安装失败 HOT 3
- 并发的问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywpsrpc.