03-23-2005 5:00 PM
hi,
does anybody know how to use the method SET_FORMAT_STRING of interface I_OI_SPREADSHEET?
specifically, how to use the parameter formatstring? is there any documentation on this?
thanks in advance
erick
09-02-2005 5:36 PM
I know this reply is a long time after the post, but I was needing to find out the same info. Just by trial and error, I figured out how the parameter formatstring works. In my case, what I needed to do was to set a "custom" format for a cell - specifically, I needed to not display zero amounts, display a zero if the amount was under $1.00, and set a place holder on positive number so that the positive and negative numbers would line up in the column. (While in Excel, you can view the help on cell formatting to get the particular formatting you need.) For what I needed, here is the command I used:
call method spreadsheet->set_format_string
exporting rangename = p_datarange
formatstring = '#,##0_);#,##0-;" "'
no_flush = no_flush
importing error = error
retcode = retcode.
I hope this helps someone out in future searches of this site.
09-02-2005 5:36 PM
I know this reply is a long time after the post, but I was needing to find out the same info. Just by trial and error, I figured out how the parameter formatstring works. In my case, what I needed to do was to set a "custom" format for a cell - specifically, I needed to not display zero amounts, display a zero if the amount was under $1.00, and set a place holder on positive number so that the positive and negative numbers would line up in the column. (While in Excel, you can view the help on cell formatting to get the particular formatting you need.) For what I needed, here is the command I used:
call method spreadsheet->set_format_string
exporting rangename = p_datarange
formatstring = '#,##0_);#,##0-;" "'
no_flush = no_flush
importing error = error
retcode = retcode.
I hope this helps someone out in future searches of this site.
08-04-2006 7:06 AM
Thanks Kris.
I have long solved this problem. And honestly, I've forgotten what I did. But definitely not as simple as your solution. A late reply is still better than no reply.
Cheers
Erick