How use Api to format cell in Excel

Leonardo Ribeiro Bet 0 Reputation points
2023-09-29T15:12:48.4366667+00:00

I'm testing a api to format cells, i need fill cells with an color an change the font color. I'm using this api for fill the cells, this api response is 200 but the worksheet doesn't change. Can you tell me why is wrong in this request?User's image

curl --location --request PATCH 'https://graph.microsoft.com/v1.0/me/drive/items/01EO6SZSSLUJF4YHMCERBKKJE4QB72GM6L/workbook/worksheets('\''Planilha1'\'')/range(address='\''A1:A2'\'')/format' \ --header 'Authorization: ${myToken}' \ --header 'Content-Type: application/json' \ --data '{     "values": [         {             "range": "A1:A2",             "format": {                 "fill": {                         "color": "#FFFFFF"                 }             }         }     ] }'

User's image

Microsoft 365 and Office Development Other
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. TH-4749-MSFT 3,315 Reputation points
    2023-09-29T16:13:56.6233333+00:00

    Hello Leonardo Ribeiro Bet,

    Thanks for reaching out. Does the issue occur if you select a different color for the fill for example #FF0000? #FFFFFF code is for the color white.


  2. TH-4749-MSFT 3,315 Reputation points
    2023-10-13T14:59:04.08+00:00

    Hello Leonardo Ribeiro Bet,

    Thanks for the update. This issue will require further investigation. I would suggest opening a support ticket for the issue.

    Thanks.

    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.