我想获取使用密码(作者,创建者,修改者)加密的.xlsx文件的详细信息。我发现this link可以满足我的需求。但是用密码文件加密后,发生了错误。
Traceback (most recent call last):
File "<ipython-input-32-254f87dddcce>", line 1, in <module>
runfile('D:/Python/Code/testFindAuthor.py', wdir='D:/Python/Code')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "D:/Python/Code/testFindAuthor.py", line 38, in <module>
print(get_creator(filePath))
File "D:/Python/Code/testFindAuthor.py", line 18, in get_creator
zf = zipfile.ZipFile(pathFile)
File "C:\ProgramData\Anaconda3\lib\zipfile.py", line 1108, in __init__
self._RealGetContents()
File "C:\ProgramData\Anaconda3\lib\zipfile.py", line 1175, in _RealGetContents
raise BadZipFile("File is not a zip file")
BadZipFile: File is not a zip file
任何想法如何获取此信息? 谢谢,抱歉我的语言。