Error when parsing a string that begins with a equal sign

Topics: Developer Forum, User Forum
May 17, 2011 at 4:55 PM

When I create a worksheet that has a string that begins with an equal sign I get the following error when I attempt to generate the workbook:

Column string index can not be empty.#0 lib/PHPExcel/ReferenceHelper.php(474): PHPExcel_Cell::columnIndexFromString('')

#1 lib/PHPExcel/ReferenceHelper.php(421): PHPExcel_ReferenceHelper->_updateSingleCellReference('yellow', 'A1', 0, 1)

#2 lib/PHPExcel/ReferenceHelper.php(335): PHPExcel_ReferenceHelper->updateCellReference('yellow', 'A1', 0, 1)

#3 lib/PHPExcel/ReferenceHelper.php(151): PHPExcel_ReferenceHelper->updateFormulaReferences('=yellow bird #1...', 'A1', 0, 1)

#4 lib/PHPExcel/Worksheet.php(1443): PHPExcel_ReferenceHelper->insertNewBefore('A1', 0, 1, Object(PHPExcel_Worksheet))

Any help would be appreciated.

Coordinator
May 24, 2011 at 9:57 PM

Are you setting the cell value using setCellValue(), or using setCellValueExplicit() to identify the cell as containing a string rather than a formula?