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