Hi Ernesto Mejia,
We have reviewed your query and suggest checking the current active
sheet name against the collection of modification required sheet names before
changing the column header text. Please find the modified code snippets below.
For your convenience, we have prepared a sample and shared on below.
Sample: Uaugjz (forked) - StackBlitz
CODE SNIPPET:
beforeCellRender(args: CellRenderEventArgs) {
if (this.spreadsheetObj.getActiveSheet().name === 'Sheet1') {
// Condition to check whether the rendered element is header cell.
if (args.colIndex >= 0 && args.colIndex <= 10 &&
args.element.classList.contains('e-header-cell')) {
let text = 'custom header ' + args.colIndex.toString();
// Add the custom text to the innerText of the element.
args.element.innerText = text;
}
}
}
|
API reference: Angular Spreadsheet API component -
Syncfusion
Kindly check the details shared above on your end and
get back to us if you need further clarification regarding this. We hope this
helps.