Read all rows from excel (.xls) and then insert into database (PHP) -
can provides me step or whole code read data excel file (.xls) , insert records database?
thank in advance,
use phpexcel library. see documentation examples.
/** include path **/ set_include_path(get_include_path() . path_separator . '../../../classes/');
/** phpexcel_iofactory */ include 'phpexcel/iofactory.php'; $inputfilename = './sampledata/example1.xls'; echo 'loading file ',pathinfo($inputfilename,pathinfo_basename),' using iofactory identify format<br />'; $objphpexcel = phpexcel_iofactory::load($inputfilename); $sheetdata = $objphpexcel->getactivesheet()->toarray(null,true,true,true); var_dump($sheetdata);
Comments
Post a Comment