[]
        
(Showing Draft Content)

Cell Tags

SpreadJS provides the ability to store data in a cell, column, row, or sheet. The setTag method helps to create tags that can store any type of data and are not visible to the user.


You can remove tags with the clear method. Tags can be cut, copied, pasted, or moved.


If the tag type is a string, then the tag can be searched. Tags are supported with undo and redo. Basic tags are supported when importing or exporting to JSON files. Custom tags are not supported when importing or exporting to JSON files.


Adding tags can also cause the CellChanged, ColumnChanged, or RowChanged event to occur.


The following code sample adds a tag to a cell.

activeSheet.setTag(1,1,"test");
alert(activeSheet.getTag(1,1,GC.Spread.Sheets.SheetArea.viewport));