Guest User

Untitled

a guest
Jun 24th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. FileInputStream inputStream = new FileInputStream(new File(templateFile));
  2. Workbook workbook = new HSSFWorkbook(inputStream);
  3.  
  4. POIFSFileSystem fs = new POIFSFileSystem(
  5. new FileInputStream("template.xls"));
  6. HSSFWorkbook wb = new HSSFWorkbook(fs, true);
  7.  
  8. FileOutputStream fileOut = new FileOutputStream("new.xls");
  9. wb.write(fileOut);
  10. fileOut.close();
Add Comment
Please, Sign In to add comment