How do you select the locale for formatted numbers in Excel?

Stig Johan Berggren 0 Reputation points
2023-02-01T12:02:04.5266667+00:00

I am using the Graph API to extract values from an Excel document in Sharepoint. I have changed my settings for regional formatting to Norwegian (Bokmål), so in Excel, all numbers with formatting are displayed as they are supposed to in the Norwegian locale. For instance, the number 19999.5 with format code "#,##0.00" is displayed as 19 999,50.

However, when I fetch this value with the Graph API, the value is returned as 19,999.50 in the text property. I have found out that formatted values from Graph are influenced by the Sharepoint site's regional settings. How can I make sure that the formatting is consistent with the view in Excel? It is important to us to have control over the decimal and thousands separators.

EDIT: This thread (https://learn.microsoft.com/en-us/answers/questions/945311/excel-number-format-not-same-as-in-styles-xml-when) seems to be relevant, but they are not using the Graph API.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,590 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,463 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,488 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,640 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 5,946 Reputation points
    2023-02-09T08:57:49.75+00:00

    Hi @Stig Johan Berggren

    As per my knowledge, it's not possible to get data in a local regional format for excel using Graph API. Since this feature/functionality is presently not available, you can submit a feature request idea using this support link, which will be monitored by Microsoft team and make the enhancements to Microsoft Graph APIs. I will also upvote for you.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.