Preview:
let sheet = workbook.getActiveWorksheet();
  let range = sheet.getUsedRange();
  let tbl = sheet.addTable(range, true);
  tbl.setPredefinedTableStyle("TableStyleLight1");
  tbl.setName("Data");
  tbl.setShowBandedRows(false);
  tbl.setShowFilterButton(true);
  let tblRange = tbl.getRange();
  let tblRowCount = tblRange.getRowCount();
  let tblValues = tblRange.getValues();
  let tblColumnCount = tblRange.getColumnCount();
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter