× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



hi Terry,

Take a look at the string you are providing:

(#.00000_);[Red](#.00000)

It starts with a (, does it not? Perhaps you did that by mistake? But it looks to me like you are asking it to start with a (

Strangely, POI does what you _say_, not what you _mean_. :-) But, FWIW, Excel does as well.


On 6/23/2010 2:22 PM, Terry Anderson wrote:
Greetings List,
I am trying to create a new cell style for my spreadsheet for a field
that is defined as 6,5. It works fairly well with one exception, the
field is prefixed with a left parenthesis. Instead of getting 0.01234 in
my cell, I get (0.01234.

Anyone have an idea as to what I am doing wrong?


D Numeric_four s like(HSSFCellStyle)
D NumFmt3 s 5I 0

/free

Numeric_FOUR = HSSFWorkbook_createCellStyle(book);

DataFmt = HSSFWorkbook_createDataFormat(book);
TempStr = new_String('(#.00000_);[Red](#.00000)');
NumFmt3 = HSSFDataFormat_getFormat(DataFmt: TempStr);
HSSFCellStyle_setDataFormat(Numeric_FOUR: NumFmt3);

HSSFCellStyle_setAlignment(Numeric_four: ALIGN_RIGHT);

/end-free


Thanks,




Terry Anderson
Programming Manager
Grede LLC.
Switchboard 1.251.867.5481 ext 212
Direct Line 1.251.809.2312
Fax 251.867.0525
Cell 1.251.363.4975




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.