poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ken wat" <ckw...@gmail.com>
Subject Unable read to file error
Date Thu, 20 Apr 2006 01:07:47 GMT
Dear all,


Got "unable to read file" error when opening a file created by POI.
To reproduce the case:
1) Create a Excel 2000 file with 2 work sheets- 1 work sheet with 3 buttons,
another work sheet with 6 buttons.
2) Run the following java code to read it and write it to another file. (
using library poi-2.5.1-final)
3) Using the Excel to open the file will got the error.


...

  String filename = args[0];
      POIFSFileSystem fs =  new POIFSFileSystem(new
FileInputStream(filename));
    HSSFWorkbook  wb = new HSSFWorkbook(fs,true);

FileOutputStream stream = new FileOutputStream(args[ 1 ]);
    wb.write(stream);
       stream.close();

.....

regards,

Coder

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message