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

Kuldeep Raj Tiwari 1 Reputation point
2024-03-27T08:09:14.1566667+00:00

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,592 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,628 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 16,086 Reputation points Microsoft Vendor
    2024-03-28T06:24:16.1633333+00:00

    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: https://feedbackportal.microsoft.com/feedback/forum/ebe2edae-97d1-ec11-a7b5-0022481f3c80.

    Thanks:)


    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