您好,
可以使用单元格按钮实现单元格内 图标+文字。API:https://demo.grapecity.com.cn/sp ... le.html#cellButtons
示例代码:
- var sheet = spread.getActiveSheet()
- var style = new GC.Spread.Sheets.Style();
- //style.locked = true;
- style.cellButtons = [
- {
- useButtonStyle: false,
- position: GC.Spread.Sheets.ButtonPosition.left,
- imageType: GC.Spread.Sheets.ButtonImageType.custom,
- imageSrc: "https://img0.baidu.com/it/u=3101694723,748884042&fm=26&fmt=auto&gp=0.jpg",
- imageSize: {
- height: 15,
- width: 15
- },
- enabled: true
- }
- ];
- sheet.setStyle(1,1,style);
- sheet.setValue(1,1,123);
- sheet.setFormatter(1,1,"¥#,##0.00")
- sheet.setColumnWidth(1,120)
复制代码 实现效果:
具体请参考学习指南:
https://demo.grapecity.com.cn/sp ... cell-buttons/purejs
|