title: How To delete Sheet rows in a worksheet in excel using office.js
body: <p>My aim is to Clear the sheet of all data.</p>
  
  <p>I have tried <strong>worksheet.getusedRange().clear()</strong> method, but it clears only the data and format but hidden rows still remain hidden. Even <strong>worksheet.getUsedRange().delete('up')</strong> doesn't remove the unhide property of rows.</p>
  
  <p>The only workaround I found was to do <strong>worksheet.getUsedRange.rowHidden = False</strong> and then do <strong>worksheet.getUsedRange().delete()</strong> which will unhide the rows in the working range but it won't unhide the rows beyond it (i.e if data/format are present up to row10 but row 100 is hidden then this method won't unhide the 100th row)</p>
  
  <p>And when I try <strong>worksheet.getRange().rowHidden = false</strong>, Then it throws an error -> "error: InvalidOperation: This operation is not permitted for the current object."</p>
  
  <p>Is there any way to delete sheet Rows like in excel UI so that even the hidden property of the rows is also deleted.</p>
  
  <p>I am using Excel Online</p>