Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPExcel - chart rendering and load excel giving error

Tags:

php

phpexcel

require_once('PHPExcel-1.7.7/Classes/PHPExcel.php');

$inputFileName = 'RN Tracker.xlsx';

$inputFileType = PHPExcel_IOFactory::identify($inputFileName);

 $objReader = PHPExcel_IOFactory::createReader($inputFileType);

if i try following

$objReader->setIncludeCharts(TRUE);

during load i get following error message:

Warning: PHPExcel_Reader_Excel2007::load(): Node no longer exists in /users/pravkum4/html/tracker/PHPExcel-1.7.7/Classes/PHPExcel/Reader/Excel2007.php on line 1518

Notice: Trying to get property of non-object in /users/pravkum4/html/tracker/PHPExcel-1.7.7/Classes/PHPExcel/Reader/Excel2007.php on line 1519

Fatal error: Call to a member function children() on a non-object in /users/pravkum4/html/tracker/PHPExcel-1.7.7/Classes/PHPExcel/Reader/Excel2007.php on line 1519

What mistake i am doing here? Should i include some additional class for chart?

Does chart option is included by default in load method of reader? chart count gives 0. :(( Sometimes gives correct chart count but rendering doesn't work.

enter image description here

One more thing, what is this code? not working for me. Sometimes i get jpgraph_pie.php missing.

PHPExcel_Settings::setChartRenderer(
    PHPExcel_Settings::CHART_RENDERER_JPGRAPH,
    dirname(__FILE__).'/../../libraries/Charts/jpgraph3.5.0b1/src'
);

Please provide a tutorial for chart rendering. Thank you so much in Advance.

like image 425
P K Avatar asked Apr 19 '26 20:04

P K


2 Answers

I have yet to see this issue raised at the PHPExcel sites on either CodePlex or on Github... and to resolve it you'll need to upload a sample file that demonstrates the problem so that we can identify what node no longer exists in the Excel data

like image 109
Mark Baker Avatar answered Apr 21 '26 11:04

Mark Baker


Look at this this may help you...

  • http://phpexcel.codeplex.com/workitem/16

  • http://phpexcel.codeplex.com/wikipage?title=Examples

like image 41
Suresh kumar Avatar answered Apr 21 '26 12:04

Suresh kumar