Skip to Content
author's profile photo Former Member
Former Member

how to format cells in Excel integration via SET_ORMAT_STRING


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


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 02, 2005 at 04: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.