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.
Add a comment