Ok,
I found old post about this subject.
It seems POI is not ready to do this, but an issue is to use a macro to
set the format for a column....
Have a look to this post: Problem with Cell formatting at columns level
Example:
To set all the column X to the format Date:
Sub Macro1()
Columns("X:X").Select
Selection.NumberFormat = "m/d/yyyy"
End Sub
It seems with POI, it is not possible to add a macro dynamically in a
workbook, maybe it is, but i didn't find any example.
Any idea?
thx
Benjamin CHALLAMEL
> Hello,
>
> Question about Excel file.
> I'm working with this JAR : poi-2.5.1-final-20040804.jar
> My version of Excel : Excel 2003
>
> I recently posted about loosing style for an HSSFCell(no answer, need more
> details?).
>
>
>
> My new question is about setting the format for an entire column.
>
> Is it possible to set a unique format for an entire column (column B for
> example) using the API?
>
> Because if I set the format to each Cell of a column, Excel after 4000
> cells prompt a warning: Number of different format to big for Excel.
> And I'm loosing the format for all cells after the 4000° cell.
>
> Any idea?
>
> Thx in advance.
>
> Benjamin CHALLAMEL
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/