MIHO
MIHO

Reputation: 101

XLSX get last column?

How can i get the the last column when reading a xlsx file using the Apache POI API? There's a getLastRowNum method but nothing related with number of columns.

Thx for help.

Upvotes: 3

Views: 2819

Answers (1)

mfulton26
mfulton26

Reputation: 31234

You have to check each Row and call Row.getLastCellNum(). The max cell num is the last column num.

Upvotes: 4

Related Questions