我一直在尝试为应用双下划线的单元格添加自定义内联样式。我的计划是获取应用双下划线的单元格,并使用其索引找到当前对应的 td,然后应用自定义样式/标签。目前我能够找到行和列索引,但如果我找到行和列索引,我怎么能在 html 字符串中找到当前的 td?有没有办法使用行和列索引找到 td ?有什么办法可以做到这一点,请告诉我。
问问题
125 次
1 回答
0
使用带有LineStyle double和borderBottom 方法的setBorder 方法将双下划线边框样式应用于单元格/范围 例如,为单元格 A1 设置双下划线:
window.onload = function (dashboard) {
// Initialize the Spread component with the following line:
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var activeSheet = spread.getActiveSheet();
// create line border
var border = new GC.Spread.Sheets.LineBorder();
border.color = "red";
// line style = double
border.style = GC.Spread.Sheets.LineStyle.double;
var cell = activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport);
// setting the border to the bottom
cell.borderBottom(border);
};
如果您有任何其他问题,请随时与 SpreadJS 支持团队联系:提交工单
最佳,麦肯齐·阿尔比茨 | GrapeCity 技术参与工程师
于 2020-07-15T18:50:02.580 回答