You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by mouss4rs <ou...@gmail.com> on 2012/02/14 12:21:40 UTC

reading a value from one column

Hello,

Indeed, I wish to get back the contents of a cell in Excel.
Ex: 
I get back the contents in the line 18 and in the column 3.

Is it feasible without loop?

I had a hard time all day long to know how to make but I arrive there not.

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/reading-a-value-from-one-column-tp5482144p5482144.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: reading a value from one column

Posted by mouss4rs <ou...@gmail.com>.
Thanks youuuuuuuuu 

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/reading-a-value-from-one-column-tp5482144p5482648.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: reading a value from one column

Posted by Nick Burch <ni...@alfresco.com>.
On Tue, 14 Feb 2012, mouss4rs wrote:
> Indeed, I wish to get back the contents of a cell in Excel.
> Ex:
> I get back the contents in the line 18 and in the column 3.
>
> Is it feasible without loop?

Fetch row 18, then fetch column 3, taking care to check if they exist or 
not?

eg
Row r18 = sheet.getRow(17); // 0 based
if (r18 != null) {
   Cell c3 = r18.getCell(2); // 0 based
   if (c3 != null) {
     // The cell exists, use it
   }
}

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org