更改default style即可
例如:
- 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.vAlign = GC.Spread.Sheets.VerticalAlign.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);
复制代码 |