In the documentation for POI text extraction - http://poi.apache.org/spreadsheet/quick-guide.html#TextExtraction One of the lines of code is: CellReference cellRef = new CellReference(row.getRowNum(), cell.getCellNum()); This assumes the Cell class has a getCellNum() method call. But only one implementing class for cell uses a getCellNum() method - HSSFCell. Neither XSSFCell nor SXSSFCell do. As that documentation page is a "Busy Developers' Guide" for those who "want to use HSSF and XSSF read and write spreadsheets in a hurry", I think that the manner in which it currently is displayed has to be changed in some fashion. Either it should be noted this will only extract text for HSSF, or the code should handle both HSSF and XSSF, or two code examples, one for each case should be there. As it currently stands, it only serves to confuse those looking at it, especially if they're having other unrelated problems with POI. There are a number of options for how it can be changed, but any one of those options would be better than the confusing example which exists now.
Fixed in r1141906 The correct method is getColumnIndex(). Yegor