Good news and yes, the shared strings table does sound like the correct
approach. I supect the answer to the encoding question lies within the code
of the XSSFRichTextString class. It will use other classes from the xmlbeans
layer I am sure but if you have a dig through the source for that class, it
may ilustrate how the mark-up is encoded. It may even be worth posting a
second question onto the list to ask specifically about this in the hopes
that Yegor - who authored XSSFRichTextString, will pick it up.

In the short term, is it possible to identify the particular use cases for
your current requirement? If so, you may be able to use Excel to create
string parts that encapsulate those requirements and, for the moment, hard
code the mark-uo into your application. For instance, if you identify how to
set the font face, the size of the font, how to embolden and how to
underline using examples created in Excel, then it may be possible to write
a class that uses these examples to create the mark-up yourself. You could
use the rich text string approach yourself and create a class that both
encapsulates the text and allows you to apply transformations to parts of it
before returning the correct mark-up when asked for it. I can easilly
imagine methods like embolden(int from, int to) where the two indices
identify that portion of the string that must be made bold. Also
underline(int from, int to) is fairly obvious and you could include
setFont(String face, int size, int from, int to), etc, etc. The most
important method would probably be getMarkup() or something similar that
returns the actual mark-up that would be written to the shared strings
table.

Yours

Mark B

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/BigGridDemo-for-a-RichText-tp3412641p3414185.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to