FormatAsTable

function FormatAsTable(sRange: string = null): void

Description

Formats the selected range of cells from the current sheet as a table (with the first row formatted as a header). As the first row is always formatted as a table header, you need to select at least two rows for the table to be formed correctly.

Parameters

sRangestringdefault: null

The range of cells from the current sheet which will be formatted as a table.

Returns

void

Try It

var oWorksheet = Api.GetActiveSheet();
oWorksheet.FormatAsTable("A1:E10");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).