The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with OOXML
时间: 2023-11-02 14:24:11 浏览: 374
"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 ]
阅读全文