You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by jahroy <ed...@skilogs.com> on 2013/05/25 03:51:22 UTC
Re: Setting the cell type to "text" for an entire column (.xls)
Christian Lercher wrote
> Ideally, I would like to call something like:
>
> sheet.setDefaultColumnCellType(Cell.CELL_TYPE_STRING);
The following code will set the default style of the first column to text:
DataFormat fmt = workbook.createDataFormat();
CellStyle textStyle = workbook.createCellStyle();
textStyle.setDataFormat(fmt.getFormat("@"));
worksheet.setDefaultColumnStyle(0, textStyle);
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Setting-the-cell-type-to-text-for-an-entire-column-xls-tp4552613p5712764.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