php - phpexcel exception error when exporting data to excel workbook -
i trying export data excel using phpexcel returns error yet specified excel file in location highlighting. thing excel file in location once returns error file no found, have not done correctly?
the error:
fatal error: uncaught exception 'exception' message 'file zip://workbooks/ndqa201303001/ndqa201303001.xlsx#xl/media/nqcl1.png not exist' in c:\server\htdocs\nqcl\application\third_party\phpexcel\writer\excel2007\contenttypes.php:216
the web script code dealing 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 not exist'; }
if using codeigntier export data query excel easy. dont need php excel this. resources available in codeigniter.
take @ answer of mine might helpful you. export data in csv format can change xlsx.
Comments
Post a Comment