java 读取excel 文件 Unable to recognize OLE stream 错误 .
来源:互联网 发布:2017java最新版本 编辑:程序博客网 时间:2024/05/18 03:43
使用 java 代码读取 excel 文件代码时报错如下:
jxl.read.biff.BiffException: Unable to recognize OLE stream
at jxl.read.biff.CompoundFile.<init>(CompoundFile.java:116)
at jxl.read.biff.File.<init>(File.java:127)
at jxl.Workbook.getWorkbook(Workbook.java:268)
at jxl.Workbook.getWorkbook(Workbook.java:253)
at test1.main(test1.java:25)
java 代码:
Workbook wb = null;
InputStream is = new FileInputStream("e://b2.xlsx");
try {
wb = Workbook.getWorkbook(is);
Sheet rs = wb.getSheet(0);
int colNum = 11;
for (int i = 0; i < rs.getRows(); i++) {
String[] nextLine = new String[colNum];
for (int j = 0; j < colNum; j++) {
nextLine[0] = rs.getCell(j, i).getContents().trim();
}
}
} catch (Exception e) {
e.printStackTrace();
}
原因:不支出读取 excel 2007 文件(*.xlsx)。只支持 excel 2003 (*.xls)。
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java 读取excel 文件 Unable to recognize OLE stream 错误 .
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java 读取excel 文件 Unable to recognize OLE stream 错误
- java读取excel文件显示Unable to recognize OLE stream
- jxl读取excel文件异常:Unable to recognize OLE stream
- jxl读取excel文件异常:Unable to recognize OLE stream
- jxl 读取excel 文件 Unable to recognize OLE stream
- java读取Excel 错误: jxl.read.biff.BiffException: Unable to recognize OLE stream
- java读取Excel 错误: jxl.read.biff.BiffException: Unable to recognize OLE stream
- java读取Excel 错误: jxl.read.biff.BiffException: Unable to recognize OLE stream
- java读取Excel 错误: jxl.read.biff.BiffException: Unable to recognize OLE stream
- java读取Excel 错误: jxl.read.biff.BiffException: Unable to recognize OLE stream
- 2014 ACM/ICPC Asia Regional Xi'an Online poj5007 Post Robot
- Android SDK开发包国内下载地址
- MVC5 Entity Framework学习之异步和存储过程
- magento 如何获取admin的用户名和邮箱
- hdu 5012 Dice
- java 读取excel 文件 Unable to recognize OLE stream 错误 .
- 手把手教你:win7下VS2012安装
- 每个程序员都应该了解的知识有哪些?
- dimens.xml
- 互联网企业盈利模式全分析
- 有名管道
- 直方图均衡化小结
- J2SE总结
- hdu 5015 233 Matrix