load Excel file

Topics: Developer Forum, Project Management Forum, User Forum
Sep 26, 2012 at 11:02 AM

I can't load my file .

Sep 26, 2012 at 11:55 AM

A bit more detail of what you're doing, such as your code, any error messages, etc would help us help you

Sep 27, 2012 at 7:05 AM

I can't run 01sample.php

I need an excle file include chart .

require_once 'Classes/PHPExcel.php';

$fileType = 'Excel2007';
$fileName = 'Result.xlsx';

 Read the file (including chart template)
$objReader = PHPExcel_IOFactory::createReader($fileType);
$objPHPExcel = $objReader->load($fileName);

 Change the file
$objSheet = $objPHPExcel->setActiveSheetIndex(0);

objSheet->getCell('A2')->setValue('1' );
objSheet->getCell('B2')->setValue('2' );
objSheet->getCell('C2')->setValue('3' );
objSheet->getCell('D2')->setValue('4' );

 Write the file (including chart)
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');

Sep 27, 2012 at 7:35 AM

If 01sample.php won't run, then there's something very wrong, and you should be getting an error message of some kind (thrown exception or whatever). If something as basic as that won't run, then it needs solving before you can even begin looking at charts.

What are you seeing on screen while it's running? Does it display any messages at all?

Sep 27, 2012 at 8:49 AM

I found the problem my folder didn't have the permission to write but i still have problem with my code , no error just white page

Sep 27, 2012 at 9:25 AM

now every thing is fine , just when I save the file , the file can't show the chart , any help

Sep 27, 2012 at 10:30 AM

Help , no chart .