views:

212

answers:

1

How do i get the index of the last column when reading a xlsx file using the apache-poi API? there's a getLastRowNum method, but i can't find nothing related to the number of columns...
thanks in advance
EDIT: i'm dealing with XLSX files

+2  A: 

I think you'll have to iterate though the rows and check HSSFRow.getLastCellNum() on each of them.

Henning