Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@MikeZyatkov
Copy link
Contributor

@MikeZyatkov MikeZyatkov commented Mar 7, 2019

Add support vertical align property (vertAlign) with possible values are superscript and subscript.
Related to #555

Use:
for entire cell
firstRow.font = { name: 'Arial', family: 2, size: 20, vertAlign: 'superscript'}

rich text:
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'}, ] };

Add support vertical align property (vertAlign) with possible values are superscript and subscript.

Use:
for entire cell
firstRow.font = { name: 'Arial', family: 2, size: 20, vertAlign: 'superscript'}

rich text:
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'},
]
};
Copy link

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be so kind and add some tests? That would be awesome!

@MikeZyatkov
Copy link
Contributor Author

@BridgeAR
I added some tests, but I'm not sure that they are completely correct. If they aren't good enough, please give me advice and I will correct them.

@alubbe alubbe requested a review from guyonroche April 3, 2019 08:59
@wukaikailive
Copy link

wukaikailive commented Apr 21, 2019

@guyonroche When to merge this part of the code

@Siemienik
Copy link
Member

@MikeZyatkov could I please you for update Readme?

@MikeZyatkov
Copy link
Contributor Author

@Siemienik done

@Siemienik Siemienik merged commit e7926cf into exceljs:master Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.