title: Office Scripts VS Office Lab
body: <p>I am confused about Office Scripts and Office Lab.</p>
  <p>Both can run <code>javascript</code> in Excel, but it seems the code can't be shared in them.</p>
  <p>For Office Scripts, some code like</p>
  <pre><code>function main(workbook: ExcelScript.Workbook) {
    // Set fill color to FFC000 for range Sheet1!A2:C2
    let selectedSheet = workbook.getActiveWorksheet();
    selectedSheet.getRange(&quot;A2:C2&quot;).getFormat().getFill().setColor(&quot;FFC000&quot;);
  }
  </code></pre>
  <p>For Script lab, the code is</p>
  <pre><code>await Excel.run(async (context) =&gt; {
      let sheet = context.workbook.worksheets.getActiveWorksheet();
      sheet.tables.add(&quot;B2:E5&quot;, true);
      await context.sync();
  });
  </code></pre>
  <p>The <code>workbook</code> are different in <code>ExcelScript.Workbook</code> and <code>context.workbook</code></p>