-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does it has low memory footprint ? #5
Comments
@danmaidesenling I believe so. Just released |
your code on this: ExcelWorkSheetRowCallbackHandler sheetRowCallbackHandler = new ExcelWorkSheetRowCallbackHandler(new ExcelRowContentCallback() {
@Override
public void processRow(int rowNum, Map<String, String> map) {
// Do any custom row processing here, such as save
// to database
// Convert map values, as necessary, to dates or
// parse as currency, etc
System.out.println("rowNum=" + rowNum + ", map=" + map);
}
}); you said that Convert map values, as necessary, to dates or parse as currency, etc. |
Typically, you have to know the structure (no. of columns, column names, etc) and excel column type information. POI doesn't provide type information. Example 1: There is a excel file you're reading that has 3 columns -
Per your requirement you have process it. Example 2: Let's say excel file has 50 columns, but per your requirements, you need 4 columns., etc. |
Actually, POI has provided type information . You can see it in WorkBook |
Could you provide more specific details? that would be helpful. |
Well.,sample code like this: Workbook wb = WorkbookFactory.create(new File("MyExcel.xls"));
Sheet sheet = wb.getSheetAt(0);
Row row = sheet.getRow(0);
Cell cell = row.getCell(0);
int cellType = cell.getCellType(); //CELL_TYPE_NUMERIC = 0; CELL_TYPE_STRING = 1... |
Okay, I understand now what you meant. And what I meant was java data types not a excel cell types. FYI PS: feel free to PR for any improvements, thanks. |
No description provided.
The text was updated successfully, but these errors were encountered: