SpreadJS Documentation
Setting Text Decoration

SpreadJS supports text decoration. You can specify a line below, above, or through the text using the textDecoration method.

Using Code

The following example adds a line above the text in cell (0,0), a line below and above the text in cell (1,0), and a line above, below, and through the text in cell (0,1).

JavaScript
Copy Code
activeSheet.getCell(0, 0).textDecoration(GcSpread.Sheets.TextDecorationType.Underline);
activeSheet.getRow(1).textDecoration(GcSpread.Sheets.TextDecorationType.Overline | GcSpread.Sheets.TextDecorationType.Underline);
activeSheet.getColumn(1).textDecoration(GcSpread.Sheets.TextDecorationType.Overline | GcSpread.Sheets.TextDecorationType.LineThrough | GcSpread.Sheets.TextDecorationType.Underline);
 
var style = new GcSpread.Sheets.Style();
style.textDecoration = GcSpread.Sheets.TextDecorationType.Overline | GcSpread.Sheets.TextDecorationType.Underline;
activeSheet.setStyle(1, 1, style, GcSpread.Sheets.SheetArea.viewport);
activeSheet.getCell(0, 0).value("Test");
activeSheet.getCell(1, 0).value("Test");
activeSheet.getCell(0, 1).value("Test");
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.