I have the following code. Its purpose is to run through an xls file using POI and write all the data to a txt file.
for ( sheetNumber in 0..numberOfSheets-1) {
HSSFSheet sheet = workBook.getSheetAt(sheetNumber)
Iterator<HSSFRow> rows = sheet.rowIterator()
while(rows.hasNext()){
row = rows.next()
Iterator<HSSFCell> cells = row.cellIterator();
println "cell:" + cells.toString()
while(cells.hasNext()){
cell = cells.next()
allEntityFile << cell.toString()
}
allEntityFile << "\n"
}
}
On my machine this code works fine, but on another computer it seems to have trouble. I narrowed it down to this. When I try to create the cells iterator
Iterator<HSSFCell> cells = row.cellIterator();
my system returns
org.apache.poi.hssf.usermodel.HSSFRow$CellIterator@156b386
Which is what I would expect. While on another system it is returning the following
java.util.HashMap$ValueIterator@38fff7
Any ideas about this discrepancies?