Retaining mixed font settings when updating spreadsheets

Topics: Developer Forum
Feb 11, 2011 at 12:25 PM
Edited Feb 11, 2011 at 12:26 PM

Hi

This may have been covered somewhere else, but I can't find an answer to my specific question.

I have existing spreadsheets that I am updating. Some of the cells have mixed font attributes (eg: this is plain, but this is italic, and this is italic bold) within the one cell. After updating the spreadsheet with data the resulting spreadsheet has lost the mixed richtext and the cell will appear as plain text. I should point out that I am not updating any of the cells that contain the mixed formatting. I am only inserting values into empty cells.

Is this a bug or is there a way of retaining these settings? I know I could insert the mixed text from PHPExcel and set the richtext formatting at that point, but I was hoping to avoid this if I could.

Any pointers would be greatly appreciated.

Cheers!

Coordinator
Feb 11, 2011 at 10:29 PM

I'm assuming that these are .xls workbooks:

Work Item 8916

Feb 14, 2011 at 2:02 PM

Hi Mark

Yes, I'm using .xls workbooks. I've tried using the PHPExcel code for setting Rich Text Format objects, but that doesn't appear to work either. Am I correct in assuming that Rich Text works ok in the .xlsx workbooks? I've had a look at the work item you included. What are the chances that this might be fixed for .xls formats any time soon? Or will it be fixed at all?

Cheers!

Coordinator
Feb 15, 2011 at 9:17 PM

Rich text works for the Excel2007, HTML and PDF Writers, but not for Excel5 yet. It's on the "to do" list. A part of my next phase of development requires reworking the underling OLE Writer (that forms the basis for the Excel5 Writer) to handle additional streams (such as document properties) and I'm hoping that I'll be able to incorporate a number of the features that aren't currently supported by the Excel5 Writer while I'm working on that. Estimated timescales for that work are mid summer.