Your Ad Here

Posted By

indianocean on 04/10/08


Tagged

java servlet poi


Versions (?)

Simply write an Excel file from POI to the file system


 / Published in: Java
 

  1. InputStream inputStream = getClass().getClassLoader().getResourceAsStream("templates/template_report.xls");
  2. POIFSFileSystem fileSystem = new POIFSFileSystem(inputStream);
  3. HSSFWorkbook workBook = new HSSFWorkbook(fileSystem);
  4. FileOutputStream out = new FileOutputStream("workbook.xls");
  5. workBook.write(out);
  6. out.close();
  7. inputStream.close();

Report this snippet  

You need to login to post a comment.