You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Andreas Schildbach <an...@4soft.de> on 2003/01/21 16:07:34 UTC

Question: How to get ranged font styles from string cells?

Hello everybody,

I asked this question in poi-user, but nobody seemed to know an answer.
Could you help, please?

I need to read font styles (bold, superscript, subscript) from HSSFCells.

  HSSFFont font = workbook.getFontAt(cell.getCellStyle().getFontIndex());

returns the style that was set for the whole cell, but my workbook also
contains string cells that have certain styles applied only on specific
ranges of the cell's string value ("this text is in <b>bold</b> and this is
<i>italic</i>").

How can I read the information about these "ranged font styles"?

Best regards,

Andreas

--
Andreas Schildbach          4Soft GmbH, Mittererstraße 3, 80336 München
mailto:andreas.schildbach@4soft.de                  http://www.4soft.de
phone: +49-89-530744-525                          fax: +49-89-530744-45
Sitz der Gesellschaft: München          Amtsgericht München: HRB 125474
Geschäftsführer Dr. Klaus Bergner, Dr. Andreas Rausch, Dr. Marc Sihling