Relative Content

Tag Archive for office-js

How to access the currently displayed / rounded off value of a cell in Excel using office js?

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 the values property, it gives back 12.001123. I tried the text property as well from the documentation, but it gives back the 12.001123 as well. I want to access the value that is showing up right now in the UI i.e. 12.00112

How to the access the currently displayed value of a cell in Excel using office js?

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 the values property, it gives back 12.001123. I tried the text property as well from the documentation, but it gives back the 12.001123 as well. I want to access the value that is showing up right now in the UI i.e. 12.00112

How do I detect the user switching accounts from within an Excel js add-in?

I’m building an Excel Js add-in taskpane that provides basic features for free and advanced features for licensed users. For that, I need to know who the current user is to look up if they have a license. I can get the current user with SSO and getAccessToken to enable/disable the advanced features and that works well.