问题描述
- php导出excel用的是phpexcel类库和thinkphp3.2.2
-
(导出数量超过26条就会报这个错误,26条以及26以内就没问题)Invalid cell coordinate [1
错误位置
FILE: D:wwwziyuanThinkPHPLibraryVendorPHPExcelCell.php LINE: 558
TRACE
#0 D:wwwziyuanThinkPHPLibraryVendorPHPExcelStyle.php(236): PHPExcel_Cell::coordinateFromString('[1')
#1 D:wwwziyuanThinkPHPLibraryVendorPHPExcelStyleFont.php(250): PHPExcel_Style->applyFromArray(Array)
#2 D:wwwziyuansundata_courseApplicationCommonCommonfunction.php(469): PHPExcel_Style_Font->setName('Candara')
#3 D:wwwziyuansundata_courseApplicationAdminControllerSuperController.class.php(966): exportExcel(Array, '????????????', Array)
#4 [internal function]: AdminControllerSuperController->exportOrderListExcel()
#5 D:wwwziyuanThinkPHPLibraryThinkApp.class.php(155): ReflectionMethod->invoke(Object(AdminControllerSuperController))
#6 D:wwwziyuanThinkPHPLibraryThinkApp.class.php(193): ThinkApp::exec()
#7 D:wwwziyuanThinkPHPLibraryThinkThink.class.php(120): ThinkApp::run()
#8 D:wwwziyuanThinkPHPThinkPHP.php(96): ThinkThink::start()
#9 D:wwwziyuansundata_courseindex.php(24): require('D:wwwziyuanT...')
#10 {main}
解决方案
PHPExcel 类库帮助文档 php导入导出excel
解决方案二:
26?是不是把excel里cell的行列顺序搞颠倒了?检查一下,数据的循环。
解决方案三:
看下是否是内存不够,提高下临时内存,再试试
ini_set('memory_limit', '1024M'); //内存限制