dqtl46964 2016-01-09 13:56
浏览 129

phpexcel getattribute节点不再存在

I have the following script

$this->load->library('excel');

$filename = FCPATH.'assets/template/monthly_report.xlsx';
$filetype = PHPExcel_IOFactory::identify($filename);
$objReader = PHPExcel_IOFactory::createReader($filetype);
$objReader->setIncludeCharts(TRUE);

$this->objExcel = $objReader->load($filename);

$this->objExcel->setActiveSheetIndex(0);
$sheet = $this->objExcel->getActiveSheet();

$sheet->setCellValue('A3', $process->process_name);

$last_num = 2; // row terakhir
$last_num_counter = 2; // row terakhir untuk counter

for($i = 4; $i <= $date_max + 3; $i++){
    $cell = $this->translate_cell($i);
    $sheet->setCellValue($cell.'2', date(($i - 3).'-M'));
}

foreach($schedules as $schedule){

}

$filename='Laporan Bulanan.xlsx';
header('Content-Type: application/vnd.ms-excel'); //mime type
header('Content-Disposition: attachment;filename="'.$filename.'"'); //tell browser what's the file name
header('Cache-Control: max-age=0'); //no cache

// PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);
$objWriter = PHPExcel_IOFactory::createWriter($this->objExcel, $filetype); //Excel2007
$objWriter->setIncludeCharts(TRUE);
$objWriter->save('php://output');

the script is loading an xlsx file as a template, the template itself contain a graph/chart. so, all I have to do is replace data in cells and then save it, without any touch to the chart stuff and then save it. but, it produce error in the begining of the generated xlsx file, it said

<p>Severity: Warning</p>
<p>Message:  PHPExcel_Reader_Excel2007_Chart::getAttribute(): Node no longer exists</p>
<p>Filename: Excel2007/Chart.php</p>
<p>Line Number: 40</p>

I have no idea about that error, please somebody save my day.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用
    • ¥15 C++ yoloV5改写遇到的问题