Hi Vivek,
Thanks for contacting Syncfusion Support.
We have checked your requirement. We would let you know that currently we don’t have support for changing column header text. However, we have prepared sample for this requirement with some limitation like while “column insertion” the applied custom text will be changed to original text. Please find the below code snippet and sample.
|
created: (): void => {
colCollection = spreadsheet.element.getElementsByClassName('e-header-cell');
//Applies cell and number formatting to specified range of the active sheet
spreadsheet.cellFormat(
{ fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle' },
'A1:F1'
);
spreadsheet.numberFormat('$#,##0.00', 'F2:F31');
},
function setHeaderText(colIdx: number, text: string) {
colCollection[colIdx].innerText = text;
}
document.getElementById('btn').addEventListener('click', function () {
setHeaderText(0, 'Custom text');
});
|
Could you please check the above details and get back to us, if you need assistance on this.
Regards,
Aravinthan S