do I have to take sth. special in consideration when applying fonts like this:
- Code: Select all
// Font for data cell row has font index = 3
CTFont fontDataRow = new CTFont();
CTFontSize fdrSize = new CTFontSize();
fdrSize.setVal( planFormat.getFontSizeGroups() );
JAXBElement<CTFontSize> element19 = smlObjectFactory.createCTFontSz( fdrSize );
fontDataRow.getNameOrCharsetOrFamily().add( element19 );
CTColor fdrColor = new CTColor();
fdrColor.setTheme( 1L );
JAXBElement<CTColor> element20 = smlObjectFactory.createCTFontColor( fdrColor );
fontDataRow.getNameOrCharsetOrFamily().add( element20 );
CTFontName fdrFontName = new CTFontName();
fdrFontName.setVal( "Times New Roman" );
JAXBElement<CTFontName> element21 = smlObjectFactory.createCTFontName( fdrFontName );
fontDataRow.getNameOrCharsetOrFamily().add( element21 );
and
- Code: Select all
// Date Cell XF
CTXf xf3 = new CTXf();
xf3.setNumFmtId( 0L );
xf3.setFontId( 3L );
xf3.setFillId( 0L );
xf3.setBorderId( 0L );
xf3.setXfId( 0L );
xf3.setApplyFont( Boolean.TRUE );
xfs.getXf().add( xf3 );
//..
So I am using the right indexes I think; the font size and bold is being applied, for instance. But I cannot get the font itself to change to Arial, Cambria or anything else, it always stays as "Calibri". Do I need a special order for setting the properties?
Does somebody know what is missing?
Thanks in andvance
mrOlicas