As Nick says, just grab the first row - there is nothing special about it. 
 

I almost sounds like you are thinking about a DBase file - they have 
specific column headers since they are formatted more like a DB table than 
a spreadsheet.

If you are asking about getting the column header (i.e. A, B, C, ...), 
then you would want to iterate through your valid columns and do:

CellReference.convertNumToColString(cell.getColumnIndex())

-Lou

Nick Burch <[email protected]> wrote on 2012-09-06 06:11:34 PM:

> Nick Burch <[email protected]> 
> 2012-09-06 06:11 PM
> 
> Please respond to
> "POI Users List" <[email protected]>
> 
> To
> 
> [email protected], 
> 
> cc
> 
> POI Users List <[email protected]>
> 
> Subject
> 
> Re: Retrieving column header.
> 
> On Thu, 6 Sep 2012, [email protected] wrote:
> > How can I get the header of a column from an excel spreadsheet. 
> Eg.. If I have a column header
> > Column1
> >     1
> >     2
> >     3
> > I want to be able to retrieve the column header ie Column1.
> 
> Grab the first row, and read the cells from that?
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

Reply via email to