0

我使用 setcellValue 来填充我的 excel 文件,但是当它到达 A99 时,它会抛出这个错误

    Fatal error: Uncaught exception 'Exception' with message 'Column string index can not be longer than 3 characters.'

这是phpexcel有一个限制,还是我以这种格式填充我的工作表时犯了一个错误

    $objPHPExcel->getActiveSheet()->setcellValue($alpha[$alpha_count] . $spreadsheet_count, $row['comment']);
4

2 回答 2

2

也许您可以尝试使用 setCellValueByColumnAndRow() :

setCellValueByColumnAndRow($alpha_count, $spreadsheet_count, $row['comment']);
于 2013-03-13T08:19:43.290 回答
0

不,这并不意味着 PHPExcel 只支持 100 行,PHPExcel 最多支持 1,048,576 行和最多 16,384 列(与 xlsx 文件的 OfficeOpenXML 格式相同)...取决于内存。

column string index的错误消息所指的是列引用(Aof A100)。

仔细检查 $alpha[$alpha_count] 的值是什么,我怀疑这不是你想的那样。

于 2013-03-13T09:51:19.237 回答