0
如何在HTML Web應用程序表中使用基於顏色的條件格式, 我已經發布了包含SLA及其狀態的HTML Web應用程序數據中的表格表。如果SLA狀態被違反,那麼顏色應在「紅色」HTML Web應用程序表中的條件格式
請參考我的表被突出了詳細的代碼Sample Sheet
function getData() {
return SpreadsheetApp
.openById('1k6HK879slQZDuKzdDzng8SnMOce-2u9_IA7E2Luhj5k')
.getSheetByName("Sheet2")
.getDataRange()
.getDisplayValues();
}
<? var data = getData(); ?>
<table id="mytable" class="table display table-striped table-bordered responsive-utilities jambo_table">
<thead>
<tr>
<th>
Date
</th>
<th>
BU Unit
</th>
<th >
Project Name
</th>
<th >
Project Created
</th>
<th >
Chargeback
</th>
<th >
Timeline
</th>
<th>SLA Status</th>
</tr>
</thead>
<tbody>
<? for (var i = 0; i < data.length; i++) { ?>
<tr>
<? for (var j = 0; j < data[i].length; j++) { ?>
<td><?= data[i][j] ?></td>
<? } ?>
</tr>
<? } ?>
</tbody>
<tfoot>
<tr>
<td ></td>
</tr>
</tfoot>
</table>