Closed
Description
Hi there,
I need superscript and subscript within cells for my project and was successful in adding this capability by just adding the following line to exceljs/lib/xlsx/xform/style/font-xform.js around line 33:
vertAlign: { prop: 'vertAlign', xform: new StringXform({ tag: 'vertAlign', attr: 'val' }) },
I'm still very unexerienced with github, so I don't know how to get this into the project, but since it seems to be the simplest new feature possible, I would really recommend somebody adds this.
It works as font-property for entire cells:
firstRow.font = { name: 'Arial', family: 2, size: 20, vertAlign: 'superscript'}
or as a rich text property:
worksheet.getCell('A10').value = {
'richText': [
{'font': {'size': 12,'color': {'theme': 1},'name': 'Calibri','family': 2,'scheme': 'minor'},'text': 'This is '},
{'font': {'italic': true,'size': 12,'color': {'theme': 1},'name': 'Calibri','vertAlign': 'superscript'},'text': 'superscript'},
{'font': {'size': 12,'color': {'theme': 1},'name': 'Calibri','family': 2,'scheme': 'minor'},'text': 'and '},
{'font': {'italic': true,'size': 12,'color': {'theme': 1},'name': 'Calibri','vertAlign': 'subscript'},'text': 'subscript'},
]
};
Metadata
Metadata
Assignees
Labels
No labels