java poi 创建新 excel写入的时候报错
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
String
filePath = "FILES\\"
+filename<span></span>+ ".xls" ; File
file = new
File(filePath); FileOutputStream
out = new
FileOutputStream(filePath); //
file = new File("filepath location"); FileInputStream
fis= new
FileInputStream(file.getAbsolutePath()); String[]
test = (String [])ExcelInfo.toArray( new
String[ 0 ]); //创建excel文件对象
HSSFWorkbook
wb = new
HSSFWorkbook(fis); //
HSSFWorkbook wb = new HSSFWorkbook(); //创建一个张表
HSSFSheet
sheet = wb.getSheetAt( 0 ); |
我先创建一个excel,然后写入的时候运行程序报错 帮忙看下 ,错误:
java.io.IOException: Unable to read entire header; 0 bytes read; expected 512 bytes
at org.apache.poi.poifs.storage.HeaderBlock.alertShortRead(HeaderBlock.java:226)
at org.apache.poi.poifs.storage.HeaderBlock.readFirst512(HeaderBlock.java:207)
at org.apache.poi.poifs.storage.HeaderBlock.<init>(HeaderBlock.java:104)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:138)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:327)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:308)
at com.CreateFiles.Excel.write2003Excel(Excel.java:32)
at com.CreateFiles.FilesCreate.main(FilesCreate.java:145)
http://c.tieba.baidu.com/p/3360341866
http://c.tieba.baidu.com/p/3360340351
http://c.tieba.baidu.com/p/3355535806
http://c.tieba.baidu.com/p/3355530540
http://c.tieba.baidu.com/p/3355711481
http://c.tieba.baidu.com/p/3355538912
http://c.tieba.baidu.com/p/3355724888
http://c.tieba.baidu.com/p/3355724888
http://c.tieba.baidu.com/p/3357136432
http://c.tieba.baidu.com/p/3356970254
http://c.tieba.baidu.com/p/3356968755
http://c.tieba.baidu.com/p/3356967050
http://c.tieba.baidu.com/p/3356965293
http://c.tieba.baidu.com/p/3356963500
http://c.tieba.baidu.com/p/3356960593
http://c.tieba.baidu.com/p/3356958748
http://c.tieba.baidu.com/p/3356936542
http://c.tieba.baidu.com/p/3356926963
http://c.tieba.baidu.com/p/3355760817
http://c.tieba.baidu.com/p/3354688625
http://c.tieba.baidu.com/p/3322476815
http://c.tieba.baidu.com/p/3360070408
http://c.tieba.baidu.com/p/3360025086
http://c.tieba.baidu.com/p/3360079428
http://c.tieba.baidu.com/p/3360039612
http://c.tieba.baidu.com/p/3360004131
http://c.tieba.baidu.com/p/3360067141
http://c.tieba.baidu.com/p/3360078291
http://c.tieba.baidu.com/p/3360035622
http://c.tieba.baidu.com/p/3360066307
http://c.tieba.baidu.com/p/3360026990
http://c.tieba.baidu.com/p/3360076598
http://c.tieba.baidu.com/p/3360044870
http://c.tieba.baidu.com/p/3360074347
http://c.tieba.baidu.com/p/3360026002
http://c.tieba.baidu.com/p/3360043626
http://c.tieba.baidu.com/p/3359434414
http://c.tieba.baidu.com/p/3359418670
http://c.tieba.baidu.com/p/3359433315
http://c.tieba.baidu.com/p/3359370467
http://c.tieba.baidu.com/p/3359385110
http://c.tieba.baidu.com/p/3359413854
http://c.tieba.baidu.com/p/3359429033
http://c.tieba.baidu.com/p/3359369465
http://c.tieba.baidu.com/p/3359384393
http://c.tieba.baidu.com/p/3359470977
http://c.tieba.baidu.com/p/3359468256
http://c.tieba.baidu.com/p/3359467524
http://c.tieba.baidu.com/p/3359457522
http://c.tieba.baidu.com/p/3360095693
http://c.tieba.baidu.com/p/3360042452
http://c.tieba.baidu.com/p/3359412687
http://c.tieba.baidu.com/p/3359439994
http://c.tieba.baidu.com/p/3359428249
http://c.tieba.baidu.com/p/3359379979
http://c.tieba.baidu.com/p/3359365410
http://c.tieba.baidu.com/p/3359412090
http://c.tieba.baidu.com/p/3359421422
http://c.tieba.baidu.com/p/3359439099
http://c.tieba.baidu.com/p/3359379242
http://c.tieba.baidu.com/p/3359420295
http://c.tieba.baidu.com/p/3359387220
http://c.tieba.baidu.com/p/3359371496
http://c.tieba.baidu.com/p/3357135017
http://c.tieba.baidu.com/p/3357188487
http://c.tieba.baidu.com/p/3356975908
http://c.tieba.baidu.com/p/3357115966
http://c.tieba.baidu.com/p/3357308004
http://c.tieba.baidu.com/p/3357853803
http://c.tieba.baidu.com/p/3357119461
http://c.tieba.baidu.com/p/3360398522
http://c.tieba.baidu.com/p/3360397387
http://c.tieba.baidu.com/p/3360396194
http://c.tieba.baidu.com/p/3360534865
http://c.tieba.baidu.com/p/3360536000
http://c.tieba.baidu.com/p/3360536000
http://c.tieba.baidu.com/p/3360537168
http://c.tieba.baidu.com/p/3360538179
http://c.tieba.baidu.com/p/3360539318
http://c.tieba.baidu.com/p/3360540512
http://c.tieba.baidu.com/p/3360545141
http://c.tieba.baidu.com/p/3360568934
http://c.tieba.baidu.com/p/3360571757
http://c.tieba.baidu.com/p/3360570598
http://c.tieba.baidu.com/p/3360578878
http://c.tieba.baidu.com/p/3360583365
http://c.tieba.baidu.com/p/3360597635
http://c.tieba.baidu.com/p/3357730668
http://c.tieba.baidu.com/p/3357740205
http://c.tieba.baidu.com/p/3357738861
http://c.tieba.baidu.com/p/3357732435
http://c.tieba.baidu.com/p/3357731702
http://c.tieba.baidu.com/p/3357744489
http://c.tieba.baidu.com/p/3357749552
http://c.tieba.baidu.com/p/3357748244
http://c.tieba.baidu.com/p/3357745240
http://c.tieba.baidu.com/p/3357746820
http://c.tieba.baidu.com/p/3357747462
http://c.tieba.baidu.com/p/3357844591
http://c.tieba.baidu.com/p/3357843183
http://c.tieba.baidu.com/p/3357856179
http://c.tieba.baidu.com/p/3357855061
http://c.tieba.baidu.com/p/3357701054
http://c.tieba.baidu.com/p/3357702373
http://c.tieba.baidu.com/p/3357711758
http://c.tieba.baidu.com/p/3357708654
http://c.tieba.baidu.com/p/3357720495
http://c.tieba.baidu.com/p/3357717009
http://c.tieba.baidu.com/p/3357715962
http://c.tieba.baidu.com/p/3357713402
http://c.tieba.baidu.com/p/3357722434
http://c.tieba.baidu.com/p/3357724762
http://c.tieba.baidu.com/p/3357728150
http://c.tieba.baidu.com/p/3357727059
http://c.tieba.baidu.com/p/3357719062
http://c.tieba.baidu.com/p/3357741757
http://c.tieba.baidu.com/p/3357730030
http://c.tieba.baidu.com/p/3357270782
http://c.tieba.baidu.com/p/3357318531
http://c.tieba.baidu.com/p/3357694273
http://c.tieba.baidu.com/p/3357659897
http://c.tieba.baidu.com/p/3357317697
http://c.tieba.baidu.com/p/3357692426
http://c.tieba.baidu.com/p/3357657994
http://c.tieba.baidu.com/p/3357275312
http://c.tieba.baidu.com/p/3357689388
http://c.tieba.baidu.com/p/3357274265
http://c.tieba.baidu.com/p/3357656525
http://c.tieba.baidu.com/p/3357685342
http://c.tieba.baidu.com/p/3357273179
http://c.tieba.baidu.com/p/3357316739
http://c.tieba.baidu.com/p/3357675967
http://c.tieba.baidu.com/p/3357664551
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。