Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- XSSFWorkbook wbk_template = new XSSFWorkbook(new FileInputStream (f_wbk_template));
- SXSSFWorkbook wbk = new SXSSFWorkbook(wbk_template, 50, true);
- Sheet sheet = wbk.getSheet(STR_SHEET_NAME);
- Row row = sheet.getRow(rownum);
- if (null == row) {
- row = sheet.createRow(rownum);
- }
- java.lang.IllegalArgumentException: Attempting to write a row[2] in the range [0,48] that is already written to disk.
- at org.apache.poi.xssf.streaming.SXSSFSheet.createRow(SXSSFSheet.java:122)
- ...
- XSSFWorkbook xssfWorkbook = new XSSFWorkbook(new FileInputStream(file));
- //do the read and edit operation with xssf......
- ......
- ......
- SXSSFWorkbook sXSSFbook = new SXSSFWorkbook(xssfWorkbook);
- //do the write operation with sxssf......
- ......
- ......
Add Comment
Please, Sign In to add comment