Closed DipanshuJuneja closed 3 days ago
Hi, @DipanshuJuneja Thanks for reaching us. Could you provide more detail scenario? If you want to set values property, let it show up the rounding off value, just like this:
Or you want to set rounding off value use some JS API?
Hi @shanshanzheng-dev thanks for your quick response on the query. I simply want to get/access the rounded off value through Office JS, in this case 12.00112, since the values
property on the Range
class gives back the actual 12.001123.
Hi @DipanshuJuneja Thanks for confirming. Could you take a look this reference if it can meet your need: https://learn.microsoft.com/en-us/javascript/api/excel/excel.formattednumbercellvalue?view=excel-js-preview? And this is an example: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-formatted-number.yaml
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.
How can I access the currently displayed value of a given cell range but not the actual value of that cell? For example - see this below image, where I have not increased the width of the cell enough to display the actual value which is getting rounded off.
If I try to get the
Range
for this cell and access thevalues
property, it gives back12.001123
. I tried thetext
property as well from the documentation, but it gives back the12.001123
as well. I want to access the value that is showing up right now in the UI i.e.12.00112
after the rounding off