Need to append data to a datatable within an HTML template and apply specific color coding to the cells. However, the challenge is that the row count may vary. The color coding rules are as follows:
- All cells should have a red background color except under the conditions specified below.
- If the value in the first column of a row is “1-3”, that cell should not be red.
- The first column (except for the first row, if it matches the above condition), the entire last row, and the last column should not be red.