我们如何使用 POI API 读取受保护的密码 Excel 文件 (.xls) [英] How can we read protected password excel file (.xls) with POI API

查看:80
本文介绍了我们如何使用 POI API 读取受保护的密码 Excel 文件 (.xls)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚学习了 POI,发现 HSSF 非常易于阅读和创建 excel 文件 (.xls).但是,当我想阅读受密码保护的 excel 时,我发现了一些问题.我花了一个小时才在网上找到这个解决方案.

I've just learned POI and find the HSSF is very simple to read and create excel file (.xls). However, I found some problem when want to read excel protected with password. It took me an hour to find this solution on internet.

请你帮我解决这个问题.如果你能给我一个代码片段,我很高兴.

Please could you help me to solve this problem. I'm very glad if you could give me a code snippet.

谢谢.

推荐答案

POI 将无法读取加密的工作簿 - 这意味着如果您保护了整个工作簿(而不仅仅是工作表),那么它将无法读取它.否则,它应该可以工作.

POI will not be able to read encrypted workbooks - that means that if you have protected the entire workbook (and not just a sheet), then it won't be able to read it. Otherwise, it should work.

这篇关于我们如何使用 POI API 读取受保护的密码 Excel 文件 (.xls)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆