WYSIWYG for Sharepoint graph explorer API

Srinivas Jayaram 1 Reputation point
2020-12-05T13:26:41.89+00:00

I am using microsoft sharepoint to host excel files on cloud. While for a project reason I am using Graph Explorer REST APIs to read and write contents to sharepoint.

Simple text scenarios:
For reading, I use the url of form

   GRAPH_EXPLORER_URL  
   + SITE_ID  
   + "/drives/"  
   + LIBRARY_ID  
   + "/items/"  
   + FILE_ID  
   + "/workbook/worksheets('"  
   + WORKSHEET + "')/range(address='" +  
   RANGE + "') "  

I do get the contents in the range
and for write, I use the same URL, but with PATCH method, with the contents

   {  
   values:[["1","2"]]  
   }  

So the issue I have, is how to use WYSIWYG in API calls
Eg:
QNY24.png

This is from a WYSIWYG editor.
When I copy and paste this directly to sharepoint, I do get what I wanted
EO7Kh.png

But I am not sure, how to achieve this using API calls.
As when it considers this as a plain text, and even if I enter equivalent HTML code produced by
WYSIWYG in it, it considers as plain text.

I did explore https://learn.microsoft.com/en-us/graph/api/resources/rangefont?view=graph-rest-1.0
but, this applies to the whole cell and not to the section of texts in the cell.

Can anyone explain How to achieve this?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,837 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deva-MSFT 2,256 Reputation points Microsoft Employee
    2020-12-08T12:16:13.563+00:00

    The closest one i notice is that you can do this with whole cell using Graph APIs.

    0 comments No comments