Skip to main content Skip to footer

Highlight the last column of a table in Pure JavaScript

Background:

With SpreadJS, our Javascript spreadsheet, users can highlight the last column of a table by setting the Table namespace method highlightLastColumn to set the last column of the table to be highlighted.

Getting Started:

Set the table method highlightLastColumn to True to indicate to highlight the last column.

 // Add table from data source
      var table = sheet.tables.addFromDataSource(
        "table",
        0,
        0,
        dataArray,
        GC.Spread.Sheets.Tables.TableThemes.dark1
      );
// Indicate to highlight the last column
       table.highlightLastColumn(true);

The table will will now how the last column highlighted like so:

Mackenzie Albitz