Scott,
Are you saying that I don't need the parenthesis at all?
I can go from TempStr = new_String('(#,##0.00_);[Red](#,##0.00)'); to
TempStr = new_String('#,##0.00_;[Red]#,##0.00');?

I'll be the first to admit I know very little about java and how it is
called from RPG so I have to ask, why does this code not produce the
same results?

Numeric = HSSFWorkbook_createCellStyle(book);

DataFmt = HSSFWorkbook_createDataFormat(book);
TempStr = new_String('(#,##0.00_);[Red](#,##0.00)');
NumFmt = HSSFDataFormat_getFormat(DataFmt: TempStr);
HSSFCellStyle_setDataFormat(Numeric: NumFmt);

HSSFCellStyle_setAlignment(Numeric: ALIGN_RIGHT);


All I did was copy the code above and changed the decimal position to
what I needed. The original code was copied from an example I found on
the web sometime back. It has caused no problems as long as I don't
exceed two decimal places.




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


This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2026 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.