Posted 20 February 2023, 3:54 pm EST - Updated 20 February 2023, 4:00 pm EST
Number formatter which was selected in ribbon
Posted by: nhan.thanh.nguyen on 20 February 2023, 3:54 pm EST
-
-
Posted 21 February 2023, 3:53 pm EST - Updated 21 February 2023, 3:59 pm EST
Dear Nhan,
It appears that you would like to apply a specific format to a number, which includes a separator and a negative setting, as depicted in the image you provided. If this is the case, the code snippet below can be used to add the desired format to a range of cells:
sheet.getRange(1, 1, 5, 5).formatter("#,##0.00_);(#,##0.00)");
Please note that the formatter method, as referenced in the code snippet, can be found at the following link: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.CellRange#formatter.
Additionally, the Formatting Demo provided at this link: https://www.grapecity.com/spreadjs/demos/features/cells/formatter/basic-formatter/purejs may also be helpful in understanding the formatting options available.
If you have a different use case or require further assistance with this query, please let us know. We are more than happy to assist you.
Best regards,
Ankit
-
Posted 21 February 2023, 5:38 pm EST
Hi Mr. Ankit,
Thank you very much for your support, your solution has already solved my case.Thanks and Best Regards,
Nhan Nguyen