How to write normal and subscript text in one excel cell?

2016-06-02 Thread janek.schroeder
Hi, I want to insert normal text and subscript/superscript (eg. CO2) in one excel cell. Here is my code which set only subscript: XSSFCellStyle style = workbook.createCellStyle(); XSSFFont font = workbook.createFont(); font.setTypeOffset(Font.SS_SUB); style.setFont(font); My problem is that I can

Re: How to write normal and subscript text in one excel cell?

2016-06-02 Thread Nick Burch
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.

Re: How to write normal and subscript text in one excel cell?

2016-06-02 Thread Javen O'Neal
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.user

CTLongHexNumber

2016-06-02 Thread Murphy, Mark
Is there a way to use CTLongHexNumber without it causing a type cannot be resolved error? The error is: The type org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLongHexNumber cannot be resolved. It is indirectly referenced from required .class files. I don't think this is an eclipse b

Re: CTLongHexNumber

2016-06-02 Thread Nick Burch
On Thu, 2 Jun 2016, Murphy, Mark wrote: Is there a way to use CTLongHexNumber without it causing a type cannot be resolved error? The error is: The type org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLongHexNumber cannot be resolved. It is indirectly referenced from required .class

RE: CTLongHexNumber

2016-06-02 Thread Murphy, Mark
I just thought of that. It is the small one. -Original Message- From: Nick Burch [mailto:apa...@gagravarr.org] Sent: Thursday, June 02, 2016 3:02 PM To: POI Users List Subject: Re: CTLongHexNumber On Thu, 2 Jun 2016, Murphy, Mark wrote: > Is there a way to use CTLongHexNumber without it