excelfile read, change and save

Topics: Developer Forum, Project Management Forum, User Forum
Sep 26, 2013 at 7:50 AM
Edited Sep 26, 2013 at 8:01 AM

i will a excel file read, then change and then save.

        $inputFileName = 'files/test.xlsx';
        $objReader = PHPExcel_IOFactory::createReader($inputFileName);
        $objPHPExcel = $objReader->load($inputFileName);
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, 10, 'This is a test');    
        $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
But i get the following errormessages:
Fatal error: Class 'PHPExcel_Reader_files/test.xlsx' not found in ... PHPExcel/IOFactory.php on line 170
But the file is in this directory, what i doing wrong?
Sep 26, 2013 at 1:19 PM
If PHPExcel is returning a "file not found" error, then either the file isn't in that directory, or PHP doesn't have permission to read the file