Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SXSSFWorkbook wb = new SXSSFWorkbook();
- wb.setCompressTempFiles(true);
- SXSSFSheet sh = (SXSSFSheet) wb.createSheet();
- // sh.setRandomAccessWindowSize(100);// keep 100 rows in memory,
- // exceeding rows will be flushed to disk
- for (int rownum = 0; rownum < 100; rownum++) {
- Row row = sh.createRow(rownum);
- for (int cellnum = 0; cellnum < 10; cellnum++) {
- Cell cell = row.createCell(cellnum);
- String address = new CellReference(cell).formatAsString();
- cell.setCellValue(address);
- }
- }
- FileOutputStream out = new FileOutputStream("D:\tempsxssf.xlsx");
- wb.write(out);
- out.flush();
- out.close();
- wb.dispose();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement