Skip to content

stylesheet and alignment not apply in excel #1997

@ajju123

Description

@ajju123

I am using xlsx and xlsx-style in angular, styles are not reflecting in excel. code is
const range = StyleUtils.decode_range(ws['!ref']);
for(let R = range.s.r+1; R <= range.e.r; ++R) {
const refNum = StyleUtils.encode_cell({c:11, r:R});
this.setTextFmt(refNum,ws);
}
private setTextFmt(cell: StyleCellObject,ws:any){
if(ws[cell]){
ws[cell].t = 's';
ws[cell].s = {
font: { name: 'Abadi', sz: 10, bold: true },
alignment: { wrapText: true, vertical: 'center', horizontal: 'center' }
};
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions