The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
SPSangeetha Priya Murugan Syncfusion Team November 8, 2022 10:57 AM UTC
Hi Dov,
We haven’t provided cell formatting support for the whole column. However, your requirement can be met by using the queryCellInfo event and the setCell & setRow methods, as shown below.
Hi Dov,
We haven’t provided cell formatting support for the whole column. However, your requirement can be met by using the queryCellInfo event and the setCell & setRow methods, as shown below.
Code Block:
queryCellInfo(args) {
let sheet = this.spreadsheetObj.getActiveSheet();
if (args.colIndex == 1) {
// apply format for 1st column
setCell(
args.rowIndex,
args.colIndex,
sheet,
{
format: '0.00E+00',
style: {
borderBottom: '1px solid #000000',
borderLeft: '1px solid #000000',
borderRight: '1px solid #000000',
borderTop: '1px solid #000000',
backgroundColor: 'yellow',
},
},
true
);
// apply width for 1st column
if (
!sheet.columns[args.colIndex] ||
sheet.columns[args.colIndex].height != 120
) {
//Condition to skip already applied columns.
setColumn(sheet, args.colIndex, { width: 120, customWidth: true });
}
}
}
We have prepared the below sample based on our suggestions.
Sample Link: https://stackblitz.com/edit/angular-8ysbbu-ae6qxn?file=app.component.ts
For more details, you can refer to the below link.
https://www.syncfusion.com/kb/13185/how-to-apply-cell-formats-and-number-formats-globally-in-spreadsheet