您试下-
- var cssStyle = activeSheet.getStyle(2,2) || new GcSpread.Sheets.Style();
- var fontElement = $("<span></span>");
- fontElement.css("font", cssStyle.font);
- fontElement.css("font-style", 'oblique');
- fontElement.css("font-variant", 'normal');
- fontElement.css("font-weight", 'lighter');
- fontElement.css("font-size", '300%');
- fontElement.css("font-family", 'arial,sans-serif');
-
- activeSheet.getCell(2,2).font(fontElement.css("font"))
复制代码 |