Files saved with Excel 2010 have black cell backgrounds when editing contents

Topics: Developer Forum, User Forum
Aug 20, 2010 at 1:13 PM

Haven't seen anyone mention this issue - hope I haven't missed anything obvious.

I've reproduced an annoyance caused by saving a file using Excel 2010 instead of 2007 which is then used in PHPExcel's ::load() function.

When loading the file into PHPExcel, performing any number of operations and spitting the file back out, it has peculiar properties in a couple of scenarios:

  • In Excel 2010 (Windows), when editing the contents of a cell (F2 or double click), the editing field gains a black background (and with black text, the contents 'invisible')
  • In Excel 2004 (Mac), when enabling freeze panes via PHPExcel, the user is unable to scroll with the mouse wheel (but the window scroll bar works fine!) until unfreezing and refreezing panes 

For instance, I am first creating the file in Excel to set up common template elements that don't need to be programatically created every time. I have verified that this occurs both when:

  • creating the original file using Excel 2010 and using it for PHPExcel's load()
  • creating the original using PHPExcel and then editing the file using Excel 2010 to add my template items and then using it for PHPExcel's load()

Lastly I have verified that this doesn't occur at all when just using PHPExcel to generate a file and viewing it in Excel 2010 - with the sheet built 100% programatically. I assume there is some difference in colour management between Excel 2007 and 2010 that is causing this and the PHPExcel library is spitting out proper 2007 files while any changes in 2010 result in an 'upgrade' of the xlsx format with different 2010 code.

I realise Excel 2010 might not yet be officially supported, but is this a known-issue?

Many thanks,
-Will

Nov 13, 2010 at 6:29 AM

Did you find a resolution to this?  I am getting the same problem with Excel2007.

Thanks,

Mark

Nov 13, 2010 at 2:44 PM

Hi Mark,

No sorry, not yet found a solution as I haven't been working on Excel integration for a couple of months. About to start again though, so I'll let you know.

I was kind of hoping that reverting to creating templates in Excel 2007 would solve the issue!

Perhaps explicitly setting a white background on creation might help? Just a thought.

-Will