本帖最后由 Richard.Huang 于 2024-2-22 11:36 编辑
可以试试这个,黑科技
- var spread = new GC.Spread.Sheets.Workbook("ss");
- var sheet = spread.getActiveSheet();
- sheet.setHyperlink(2, 2, {
- url: "https://www.baidu.com/",
- });
- style = new GC.Spread.Sheets.Style();
- style.decoration = {
- icons: [
- {
- src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8dGl0bGU+TGF5ZXIgMTwvdGl0bGU+CiAgPHRleHQgc3Ryb2tlPSIjMDAwIiB4bWw6c3BhY2U9InByZXNlcnZlIiB0ZXh0LWFuY2hvcj0ic3RhcnQiIGZvbnQtZmFtaWx5PSJOb3RvIFNhbnMgSlAiIGZvbnQtc2l6ZT0iMjQiIGlkPSJzdmdfMSIgeT0iMjAiIHg9IjAiIHN0cm9rZS13aWR0aD0iMCIgZmlsbD0iIzAwMDAwMCI+KjwvdGV4dD4KIDwvZz4KPC9zdmc+",
- position: GC.Spread.Sheets.IconPosition.rightOfText,
- },
- ],
- };
- sheet.setValue(2, 2, "展开");
- sheet.setStyle(2, 2, style);
复制代码
|