Locale Specification in 'Convert to Other Formats' Graph API Call

Tong Yu 0 Reputation points
2024-07-30T09:33:37.8533333+00:00

Hi,

I am using the Microsoft Graph API to convert DOCX and PPTX documents into PDFs. I am referring to the documentation at the following link:

https://learn.microsoft.com/en-us/graph/api/driveitem-get-content-format?view=graph-rest-1.0&tabs=http#format-options

I have noticed that when Office documents contain cells with numbers or dates, the resulting PDFs default to English US formatting conventions. For example, numbers use a dot as the decimal separator and a comma for thousands (e.g. 1,234.56), and dates (month and years) are formatted as MM/YY.

However, for German documents, the formatting conventions are different: a comma is used as the decimal separator, a dot for thousands (e.g. 1.234,56), and dates are formatted as MM.DD.

When opening the document with the Windows Office application set to the German locale, or via Office Online with a German display language, the document is correctly formatted according to German conventions. However, I have not found a way to achieve this via the Graph API.

I tried the following settings but got no luck:

  1. https://****.sharepoint.com/_layouts/15/regionalsetng.aspx SharePoint region settings
  2. https://portal.azure.com/#settings Azure Portal language/region settings
  3. https://myaccount.microsoft.com/settingsandprivacy/language Account Office language/regions + use the account for the Graph API call

None of the above took effect with Graph API. The number and dates are still converted to US locale format.

Is there a way to specify a transformation locale for the 'Convert to Other Formats' API call, so that the resulting PDF follows the specified regional formatting conventions?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,891 Reputation points
    2024-08-12T16:37:24.7933333+00:00

    Hello,

    Thanks for reaching Microsoft.

    The Locale Specification feature for the 'Convert to Other Formats' Microsoft Graph API is currently not available. I recommend that you submit a feature request through the Microsoft Graph feedback portal. Thank you.

    Hope this helps.

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

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.