poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Schildbach" <andreas.schildb...@4soft.de>
Subject Re: Question: How to get ranged font styles from string cells?
Date Wed, 22 Jan 2003 10:18:59 GMT
Hello Brian, hello everybody else,

I am now trying to get these text/font styles via the event model api.

I found that all strings are stored in an SST record (static string table).
I also found LABELSST records for each string cell, pointing to entries in
the SST.
If I set part of strings to bold, I am also able to identify an additional
FONT record with .boldweight=2bc (190=plain, 2bc=bold?).

However, I am still missing the connecting link between the LABELSST records
and the correct FONT record. No other record seems to be referencing the
bold FONT.

Does Excel maybe encode this information outside the Workbook stream of the
POIFileSystem? (maybe in the SummaryInformation or
DocumentSummaryInformation?)

Regards,

Andreas

> Unfortunately, this data just isn't exposed in the usermodel.
>
> > -----Original Message-----
> > From: Andreas Schildbach [mailto:andreas.schildbach@4soft.de]
> > Sent: Tuesday, January 21, 2003 10:08 AM
> > To: poi-dev@jakarta.apache.org
> > Subject: 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>").



Mime
View raw message