poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javen O'Neal" <javenon...@gmail.com>
Subject Re: How to write normal and subscript text in one excel cell?
Date Thu, 02 Jun 2016 17:13:46 GMT
Nick is right about RichText.

Also check out CellUtil#setCellStyleProperty, which will avoid creating
duplicate styles or unintentionally modifying other calls that share the
same style.
https://poi.apache.org/apidocs/org/apache/poi/ss/util/CellUtil.html#setCellStyleProperty(org.apache.poi.ss.usermodel.Cell,%20java.lang.String,%20java.lang.Object)
On Jun 2, 2016 8:07 AM, "Nick Burch" <apache@gagravarr.org> wrote:

> On Thu, 2 Jun 2016, janek.schroeder wrote:
>
>> I want to insert normal text and subscript/superscript (eg. CO2) in one
>> excel cell.
>>
>
> You want to use RichTextString functionality. See the docs for more:
> http://poi.apache.org/spreadsheet/quick-guide.html#RichText
> And also some examples, eg
>
> https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithRichText.java
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message