More than 26 fields

Topics: Developer Forum
Feb 11, 2012 at 12:29 PM

In Excel when there are more than 26 fields the alphabet starts over again. IE Cell AA1, AB1, AC1, ...

I just tried the syntax:

->setCellValue('AA1', 'activity')

This causes the error:

[11-Feb-2012 07:11:09] PHP Fatal error:  Call to a member function setValue() on a non-object in /home/chris036/public_html/tools/PHPExcel_1.7.6/Classes/PHPExcel/Worksheet.php on line 861

Is there a work around to create an Excel file with more than 26 fields?

 

Ron

Coordinator
Feb 11, 2012 at 2:49 PM

I don't know exactly what you're doing, but setCellValue('AA1', 'activity') should work without problem. PHPExcel does not impose any restriction to 26 columns. Can you please provide more details of your script, e.g. are you using cell caching (and if so, which method), is this a workbook you've loaded from file or created as a new PHPExcel object, etc.