[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Formatting cells in a spreadsheet
I'm creating excel spreadsheets using Scott's HSSF examples and have a
question. A cell is set up to display a percentage and I use the
following code to define the cell:
Numeric3 = HSSFWorkbook_createCellStyle(book);
TempStr = new_String('##0.000');
NumFmt = HSSFDataFormat_getFormat(DataFmt: TempStr);
HSSFFont_setBoldweight(ChFont: BOLDWEIGHT_BOLD);
HSSFCellStyle_setFont(Numeric3: ChFont);
HSSFCellStyle_setDataFormat(Numeric3: NumFmt);
HSSFCellStyle_setAlignment(Numeric3: ALIGN_RIGHT);
When outputting data to the field it looks like this: 85.52
Management has asked if I can add the percent sign (%) at the end of
the field, like this: 85.52%
I've been unsuccessful in getting the percent sign to show up. Any
assistance would be appreciated.
Karl B. Woods
Sr. Programmer/Analyst
Professional Services
DriverTech
1960 S. Milestone Dr., Ste B
Salt Lake City, UT 84104
( Tel: (801) 433-9426 (office)
( Fax: (801) 478-2775
* E-mail: [1]karl.woods@xxxxxxxxxxxxxx
LiveSTRONG
....... __o Same Road
....... \<, Same Rules
.... ( )/ ( ) Same Rights
This e-mail contains proprietary information and may be confidential.
If you are not the intended recipient of this e-mail, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you received this message in error,
please delete it immediately.
References
1. mailto:karl.woods@xxxxxxxxxxxxxx

-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------