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:
- https://****.sharepoint.com/_layouts/15/regionalsetng.aspx SharePoint region settings
- https://portal.azure.com/#settings Azure Portal language/region settings
- 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?