【发布时间】:2015-08-27 09:52:55
【问题描述】:
是否有可能以其他方式或至少像这样但有更多颜色选项?
这很好,可以满足我的需要,但我还需要更多颜色选项,这是代码
function excelExport(e) {
var sheet = e.workbook.sheets[0];
for (var rowIndex = 1; rowIndex < sheet.rows.length; rowIndex++) {
var row = sheet.rows[rowIndex];
for (var colIndex = 0; colIndex < (sheet.columns.length-2); colIndex++) {
if (row.cells[colIndex].value == "Weekend-") {row.cells[colIndex].format = "[Blue];";}
if (row.cells[colIndex].value == "Vacation Day-") { row.cells[colIndex].format = "[Yellow];"; }
if (row.cells[colIndex].value == "Holiday-") { row.cells[colIndex].format = "[Green];"; }
if (row.cells[colIndex].value == "Critical Task-") { row.cells[colIndex].format = "[Red];"; }
}
}
}
【问题讨论】:
标签: excel telerik kendo-grid