可以使用setDefaultStyle来设置样式:
- var defaultStyle = new GC.Spread.Sheets.Style();
- defaultStyle.backColor = "LemonChiffon";
- defaultStyle.foreColor = "Red";
- defaultStyle.formatter = "0.00";
- defaultStyle.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
- defaultStyle.borderLeft = new GC.Spread.Sheets.LineBorder("Green",GC.Spread.Sheets.LineStyle.medium);
- defaultStyle.borderTop = new GC.Spread.Sheets.LineBorder("Green",GC.Spread.Sheets.LineStyle.medium);
- defaultStyle.borderRight = new GC.Spread.Sheets.LineBorder("Green",GC.Spread.Sheets.LineStyle.medium);
- defaultStyle.borderBottom = new GC.Spread.Sheets.LineBorder("Green",GC.Spread.Sheets.LineStyle.medium);
- activeSheet.setDefaultStyle(defaultStyle, GC.Spread.Sheets.SheetArea.viewport);
复制代码
可以参考:https://demo.grapecity.com.cn/sp ... l#scsheetstyle.html |