Date format in excel sheet is getting converted to different format when converting it to pdf

Kuldeep Raj Tiwari 1 Reputation point

I am using this endpoint to convert excel document to pdf:

GET /drive/items/{item-id}/content?format={format}
GET /drive/root:/{path and filename}:/content?format={format}

In the attachment:
Excel documents with containing date in dd-mm-yyyy format. Excel version.png
Converted to pdf where date format is getting changed to mm-dd-yyyy format. pdf version.png

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,573 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,609 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 16,081 Reputation points Microsoft Vendor

    Hi @Kuldeep Raj Tiwari,

    As per my knowledge, it is an expected behavior when converting Excel to PDF using Graph API. This is by default and I'm afraid currently we cannot change this.

    I would suggest you modify the change the format of the Date and Time fields to Text. Also, you can post feedback in this dedicated community to Graph API:


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments