The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with

5 篇文章 0 订阅
3 篇文章 0 订阅

The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with OOXML (Office Open XML) Documents. You need to call a different part of POI to process this data (eg HSSF instead of XSSF)

场景:easyExcel导入时报错,百度之后发现是.xls文件手动修改后缀为.xlsx,poi识别报错

解决方法:.xls另存为.xlsx而不是手动修改后缀

  • 13
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
"The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with OOXML (Office Open XML) Documents. You need to call a different part of POI to process this data (e.g. HSSF instead of XSSF)"这个错误是由于使用了错误的POI部分处理给定的数据格式引起的。您需要调用POI的另一个部分来处理数据。具体来说,如果您处理的是doc文件,应该使用HWPFDocument来读取;如果您处理的是xls文件,应该使用HSSFWorkbook来读取。如果您处理的是docx文件,应该使用XWPFDocument来读取;如果您处理的是xlsx文件,应该使用XSSFWorkbook来读取。请根据您所处理的文件类型选择正确的POI部分进行处理。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [The supplied data appears to be in the OLE2 Format.](https://blog.csdn.net/qq_40014707/article/details/114318042)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [POI OLE2NotOfficeXmlFileException:The supplied data appears to be in the OLE2 Format问题解决](https://blog.csdn.net/qq_38974638/article/details/116210340)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值