Exception in thread "main" org.apache.poi.poifs.filesystem.OfficeXmlFileException
最近在使用poi操作excel时发现一个问题,详细如下:
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: javax.xml.stream.XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory;
at org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller.<clinit>(PackagePropertiesMarshaller.java:45)
经过了好久研究才发现是自己使用的poi jar包版本过高,我使用的是3.11,而换成3.10后问题便解决了。。。
另外,必须要明确的是:
HSSFWorkbook:是操作Excel2003以前(包括2003)的版本,扩展名是.xls
XSSFWorkbook:是操作Excel2007的版本,扩展名是.xlsx
对于不同版本的EXCEL文档要使用不同的工具类,如果使用错了,会提示如下错误信息。
org.apache.poi.openxml4j.exceptions.InvalidOperationException
org.apache.poi.poifs.filesystem.OfficeXmlFileException
Exception in thread "main" org.apache.poi.poifs.filesystem.OfficeXmlFileException的更多相关文章
- org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML.
org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Offic ...
- Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com.test.bean.groupMapper is not known to the MapperRegistry.
Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com. ...
- MyBatis笔记----报错Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ij34.model.UserMapper.selectUser
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@41cf53f9: startup ...
- MyBatis笔记----报错:Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方法
报错 Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound st ...
- Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=lenovo, access=WRITE, inode="/user/hadoop/spark/people_savemode_test/_temporary/0":hadoop:supergro
保存文件时权限被拒绝 曾经踩过的坑: 保存结果到hdfs上没有写的权限 通过修改权限将文件写入到指定的目录下 * * * $HADOOP_HOME/bin/hdfs dfs -chmod 777 /u ...
- Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=Mypc, access=WRITE, inode="/":fan:supergroup:drwxr-xr-x
在window上编程提示没有写Hadoop的权限 Exception in thread "main" org.apache.hadoop.security.AccessContr ...
- WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Exception in thread "main" java.io.IOException: No FileSystem for sc F
1.执行脚本程序报如下所示的错误: [hadoop@slaver1 script_hadoop]$ hadoop jar web_click_mr_hive.jar com.bie.hive.mr.C ...
- spark运行java-jar:Exception in thread "main" java.io.IOException: No FileSystem for scheme: hdfs
今天碰到的一个 spark问题,困扰好久才解决 首先我的spark集群部署使用的部署包是官方提供的 spark-1.0.2-bin-hadoop2.tgz 部署在hadoop集群上. 在运行java ...
- 【Hadoop & Ecilpse】Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=bruce, access=WRITE, inode="/out2/_temporary/0":atguigu:supergroup:drwxr-xr-x
问题再现: 使用本机 Ecilpse (Windows环境) 去访问远程 hadoop 集群出现以下异常: 问题原因: 因为远程提交的情况下如果没有 hadoop 的系统环境变量,就会读取当前主机的 ...
随机推荐
- Visual Studio 项目模板制作(二)
上一篇,我们制作了项目模板,本篇我制作项模板 首先,从我们需要导出模板的项目中,文件->导出模板,弹出 导出模板向导 对话框 选择项模板,点击下一步 选择要导出的项,点击下一步 选择要Refer ...
- 【Coursera】Security Introduction -Eighth Week(1)
Security Introduction People With Bad Intent 今天,Bob 向 Alice 发送了一条 "Hello,Allice!" 的信息,他们希望 ...
- 网易云音乐综合爬虫python库NetCloud v1版本发布
以前写的太烂了,这次基本把之前的代码全部重构了一遍.github地址是:NetCloud.下面是简单的介绍以及quick start. NetCloud--一个完善的网易云音乐综合爬虫Python库 ...
- Python操作Rabbit MQ的5种模式
python版本: 2.7.14 一 消息生产者代码: # -*- coding: utf-8 -*- import json import pika import urllib import u ...
- python 筛选
data=[,,,,,,,-,-] result=[x ]
- python2 安装scrapy出现错误提示解决办法~
首先:set STATICBUILD=true && pip install lxml 安装环境: windows7操作系统,已经正确安装python,pip. 使用pip功能安装Sc ...
- vector_01
尾部 ==> 添加/删除 快 头部/中间 ==> 添加/删除 慢 A.尾部 添加/移除: void vector::push_back(); void vector::pop_back( ...
- Qt5.3.2_CentOS6.4_x86_编程调试环境【勿删,简洁】
ZC:使用的虚拟机环境是:博客园VMwareSkill 的 “CentOS6.4x86EngCustomize120g__20160307.rar” 1. For Qt5.3.2: 基本需要的 软件包 ...
- Codeforces 862B - Mahmoud and Ehab and the bipartiteness
862B - Mahmoud and Ehab and the bipartiteness 思路:先染色,然后找一种颜色dfs遍历每一个点求答案. 代码: #include<bits/stdc+ ...
- 雷林鹏分享:C# 委托(Delegate)
C# 委托(Delegate) C# 中的委托(Delegate)类似于 C 或 C++ 中函数的指针.委托(Delegate) 是存有对某个方法的引用的一种引用类型变量.引用可在运行时被改变. 委托 ...