title: MS Graph API protect Excel worksheet function with the range
body: <p>I want to stop others from editing the cell contents(ex: A4:H36) in my excel sheet using MS Graph API. Do I need to do two-step?</p>
  
  <ol>
  <li>Set up the "Format Cells" as locked status used <a href="https://docs.microsoft.com/en-us/office/vba/api/excel.cellformat.locked" rel="nofollow noreferrer">MS Graph API VBA locked</a></li>
  <li>Use <a href="https://docs.microsoft.com/en-us/graph/api/worksheetprotection-protect?view=graph-rest-1.0&amp;tabs=http" rel="nofollow noreferrer">MS Graph API protect</a> to activate the protection</li>
  </ol>
  
  <p>But I don't know how to set the range of cells (ex: A4:H36) as "locked" by MS Graph API, like this:</p>
  
  <ol>
  <li>POST .../workbook/worksheets('XXXX')/Range(address='A4:H36')/<strong>locked</strong></li>
  <li>POST .../workbook/worksheets('XXXX')/protection/protect</li>
  </ol>
  
  <p>Did someone has experience with this? Thank you.</p>
  
  <p>Regards,</p>
  
  <p>ilu989</p>