Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
我在Github上看到了另一个类似的查询,他们唯一的解决方案是与win32.com Resave或Roll后退Pandas打开。因此,这样的事情可能无需更改版本或单独修改文件就可以解决问题。
提供的示例文件已使用此代码进行了测试。
如果XLSX文件具有 gresent<类'openpyxl.styles.fills.fills.fill'> exception exception在打开时,然后使用xlwings打开并用新名称保存并尝试打开该文件,然后尝试再次使用该文件第二次,允许您阅读数据。
I saw another similar query on github and their only solution was to open with win32.com resave or roll back pandas. Therefore something like this may do the trick without having to change versions or separately modify the files.
The example file provided was tested with this code.
If the xlsx file has an expected <class 'openpyxl.styles.fills.Fill'> exception when opening then use xlwings to open and save with new name and try opening the file again which should work second time and allow you to read the data.