No valid entries or contents found, this is not a valid OOXML (Office Open XML) file poi-tl
时间: 2023-10-21 10:26:46 浏览: 328
poi操作excel所用jar包
"No valid entries or contents found, this is not a valid OOXML (Office Open XML) file" 这个错误是由于文档加密导致的。解决方法有两种。第一种是和领导要密码,以解密文档。第二种是通过在百度搜索word在线解密工具来解决。选择其中一种方法进行操作,就可以解决这个问题。
关于poi-tl,当把Excel文件放到resources目录下时,需要配置打包资源时不过滤。否则,在打包时会将Excel中配置的${变量名}进行转义。具体的pom配置如下:
```
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/*.xlsx</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.xlsx</exclude>
</excludes>
</resource>
</resources>
</build>
```
通过以上的配置,可以确保在打包时不对Excel文件进行过滤,避免了${变量名}的转义问题。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [No valid entries or contents found, this is not a valid OOXML (Office Open XML) file](https://blog.csdn.net/weixin_45818332/article/details/128410847)[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%"]
- *2* [easypoi 模板导出错误:No valid entries or contents found, this is not a valid OOXML (Office Open XML) ...](https://blog.csdn.net/dubhe_zhao/article/details/122410134)[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 ]
阅读全文