phpexcel循环导出多个sheet,设置2个sheet正常,当设置第3个sheet时,报错“You tried to set a sheet active by the out of bounds index: 2. The actual number of sheets is 2”,下面部分代码及说明:
然后循环创建sheet
然后往sheet里添加数据,当setactivesheetindex(2)时会报错,截图如下:
在百度上找了一圈也没找到办法,求大神指点~
phpexcel循环导出多个sheet,设置2个sheet正常,当设置第3个sheet时,报错“You tried to set a sheet active by the out of bounds index: 2. The actual number of sheets is 2”,下面部分代码及说明:
然后循环创建sheet
然后往sheet里添加数据,当setactivesheetindex(2)时会报错,截图如下:
在百度上找了一圈也没找到办法,求大神指点~
1 回答4.1k 阅读✓ 已解决
3 回答1.9k 阅读✓ 已解决
2 回答2.3k 阅读✓ 已解决
1 回答1.4k 阅读✓ 已解决
2 回答2.2k 阅读
1 回答627 阅读✓ 已解决
802 阅读