fastexcel is the newest.
create a xsl file first,then go to read it,the results showed that the last column lost.However, when I saved the XLS documents again,the last column is not last when reading.
Generated code:
java code
Workbook workBook;
workBook = FastExcel.createWriteableWorkbook(xls);
workBook.open();
int rowsLength = rows.length;
int sheets = rowsLength / sheetRows
+ (rowsLength % sheetRows > 0 ? 1 : 0);
int sheetNumber;
for (int i = 0; i < sheets; i++) {
sheetNumber = i + 1;
Sheet sheet = workBook.addStreamSheet(sheetName + sheetNumber);
// sheet.addRow(titles);
for (int j = i * sheetRows; j < rowsLength; j++) {
sheet.addRow(rows[j]);
if (j >= sheetRows * sheetNumber) {
break;
}
}
}
workBook.close();
code by read
java code
Workbook workBook;
workBook = FastExcel.createReadableWorkbook(xls);
workBook.setSSTType(BIFFSetting.SST_TYPE_DEFAULT);
workBook.open();
Sheet s;
s = workBook.getSheet(0);
excelContent = new String[s.getLastRow()-startRow][];
for (int i = startRow; i < s.getLastRow(); i++) {
excelContent[i-startRow] = s.getRow(i);
}
workBook.close();
u may change
to