Im trying to read an existing excel file and write in it. Here is my code :
include './Classes/PHPExcel.php'; include './Classes/PHPExcel/IOFactory.php';
include './Classes/PHPExcel/Writer/Excel2007.php'; include './Classes/PHPExcel/Reader/Excel2007.php';
$objet1 = new PHPExcel_Reader_Excel2007();
$excel1 = $objet1->load('BC_ENTREE_DATA.xlsx');
$sheet = $excel1->getSheetByName('ENTREE_BC_ETUDIANT');
$sheet -> setCellValueByColumnAndRow('1','7', 'test');
$save = new PHPExcel_Writer_Excel2007($excel1);
echo'Generation du fichier excel';
I have this error : Call to a member function setCellValueByColumnAndRow() on a non-object
I really don't know why.
Thanks for helping me.