• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 703
  • Last Modified:

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
0
manavilai
Asked:
manavilai
  • 5
  • 3
2 Solutions
 
objectsCommented:
try setting the alignment of the font used for the text

font.setAlignment( Alignment.SUPERSCRIPT);
0
 
objectsCommented:
0
 
objectsCommented:
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
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
manavilaiAuthor Commented:
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
0
 
objectsCommented:
I don't believe jxl supports that.
you might need to find a font that includes a trademark symbol and use it
0
 
manavilaiAuthor Commented:
after some investigation.As i was looking for TM and SM symbols in excel sheet.
We can make use of the ASCII formats to achieve the same.

use ascii code ™ to print the TM symbol on the excel sheet.
use ascii code &#8480, to print the SM symbol on the excel sheet.

cheers,
manavilai
0
 
objectsCommented:
thats what I suggested in my last comment
0
 
manavilaiAuthor Commented:
providing the ascii values in my comment.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now