Link to home
Start Free TrialLog in
Avatar of manavilai
manavilai

asked on

Multiple Cell Formats in JXL

I am in need to create a excel document in JXL.
However one of the Cell Contents need to have value as "My Company TM"
The only catch is that TM should be superscripted.
Any ideas to accomplish the same.

Thanks,
manavilai
Avatar of Mick Barry
Mick Barry
Flag of Australia image

try setting the alignment of the font used for the text

font.setAlignment( Alignment.SUPERSCRIPT);
ignore my first comment, you now specify it with the writeable fonts style

writeableFont.setScriptStyle(ScriptStyle.SUPERSCRIPT);

see the example above for full example

you can also then apply that font to one of your own cell formats if need be
Avatar of manavilai
manavilai

ASKER

savant,

I am in agreement with you.If the whole text has to be superscripted.
However my requirement is that part of the string should be superscripted.

My Company TM

only TM should be superscripted

thanks,
manavilai
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thats what I suggested in my last comment
providing the ascii values in my comment.