While trying to read an xls file using jExcelAPI, I find that the library dumps a lot of information in stderr, sometimes this information is not relevant. For example, this code snippet causes lots of 'Warnings' to be dumped on stderr stream:
Workbook workbook = Workbook.getWorkbook(new File(flname));
//For each sheet in the workbook
for (int currentSheet = 0; currentSheet < workbook.getNumberOfSheets(); currentSheet++)
{
Sheet sheet = workbook.getSheet(currentSheet);
System.out.println("Currently processing " + sheet.getName());
}
The warnings are like:
Currently processing frst sheet
Warning: Cell C33680 already contains data
Warning: Cell D33680 already contains data
Warning: Cell E33680 already contains data
Warning: Cell F33680 already contains data
Warning: Cell B33680 already contains data
Currently processing Lst Sheet
How to avoid the library from dumping all this unwanted data? Also I do not understand why the code even looks at all the cells of the sheet, when all I am asking for it to do is list the name of the sheets (I understand that Workbook.getSheetNames() can do a similar task - but say I wanted to print the name of the sheet and contents of a single cell in the sheet).
Am I using the library incorrectly?