I use the following code :
int lastRowNum = sheet.getLastRowNum();
// Browse rows
for (int rowIndex=0; rowIndex<=lastRowNum; rowIndex++) {
HSSFRow row = sheet.getRow(rowIndex);
int lastCellNum = row.getLastCellNum();
// Browse cells
for (int cellIndex=0; cellIndex<=lastCellNum; cellIndex++) {
HSSFCell cell = row.getCell(cellIndex);
}
}
On Tue, Oct 14, 2008 at 9:09 AM, Hardie82 <[EMAIL PROTECTED]>wrote:
>
> Hi. Iam also interessted for a simple way to get the number of the columns
> without iterating rows. Is there a solution for this? I searched the
> sheet-class in the api but didn't found a method for it.
>
> Hardie
>
>
> Kalkunda, Venkat wrote:
> >
> > Hi,
> >
> > My name is Venkat. I am working on a project which is using the=20
> > http://jakarta.apache.org/poi/apidocs API? I would appreciate any help
> > tha=
> > t I can get.
> >
> >
> > Can somebody tell me, if there is a method or a way to find out the
> number
> > =
> > of rows and the number of columns that have been populated with
> > values(like=
> > text, integer or formula, etc.) in the Excel workbook?
> > Thank You
> >
> > Thank You
> > Kalkunda Venkat
> > GFRIS - Principal Financial Group
> >
>
> --
> View this message in context:
> http://www.nabble.com/Row-Column-number%21%21%21-tp530660p19968118.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Cordialement,
Pierre Lavignotte
Ingénieur Conception & Développement
http://pierre.lavignotte.googlepages.com