Yes, I also assumed, that this would be the method I was looking for - however,
I believe that a CellStyle is not responsible for setting the data type (?)
Ideally, I would like to call something like:
sheet.setDefaultColumnCellType(Cell.CELL_TYPE_STRING);
-------- Original-Nachricht --------
> Datum: Tue, 5 Jul 2011 14:33:29 +0100 (BST)
> Von: Nick Burch <[email protected]>
> An: POI Users List <[email protected]>
> Betreff: Re: Setting the cell type to "text" for an entire column (.xls)
> On Tue, 5 Jul 2011, Christian Lercher wrote:
> > with Excel, it's possible to set the data type (like text, numeric, ...)
> > for an entire column. This is applied to all cells in the column - even
> > those, which do not contain data yet. The setting survives
> > saving/loading an xls file.
>
> Did you try setting the default column style to a style with your required
> formatting? It's XSSFSheet.setDefaultColumnStyle(int,CellStyle)
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]