I am trying to export data to excel using phpexcel but it returns this error yet the specified excel file is in that location its highlighting. The thing is that excel file is in that location but once it returns that error the file is no where to be found, what have i not done correctly?
The error:
Fatal error: Uncaught exception 'Exception' with message 'File zip://workbooks/NDQA201303001/NDQA201303001.xlsx#xl/media/nqcl1.png does not exist' in C:\server\htdocs\NQCL\application\third_party\PHPExcel\Writer\Excel2007\ContentTypes.php:216
The web script code dealing with the proccess
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load("workbooks/" . $labref . "/" . $labref . ".xlsx");
$objPHPExcel->getActiveSheet(0)
->setCellValue('E22', 'Tabs/Capsule Weight')
->setCellValue('E23', 'No.')
->setCellValue('F23', 'Tabs/Capsule Weights (mg)');
$dir = "workbooks";
if (is_dir($dir)) {
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save("workbooks/" . $labref . "/" . $labref . ".xlsx");
echo 'Data exported';
} else {
echo 'Dir does not exist';
}