Format range as a table
Description
Formats the range of cells A1:D10 as a table.
(function()
{
Api.GetActiveSheet().FormatAsTable("A1:D10");
})();
Methods used: GetActiveSheet, FormatAsTable
Reference Microsoft VBA macro code
Sub example()
Sheet1.ListObjects.Add(xlSrcRange, Range("A1:D10"), , xlYes).Name = "myTable1"
End Sub