php - PHPExcel, Copy sheet from one to another xls document with style -


i need create xls file using lists of other files

i this:

    $objreader = phpexcel_iofactory::createreader('excel5');     $file_tmpl = $objreader->load('doc10.xls'); 

$file_tmpl - resulting file

    $file1 = $objreader->load('doc11.xls'); 

$file1 - file copied sheet

    $file1->setactivesheetindex(1);     $sheet = $file1->getactivesheet();               $file_tmpl->addsheet($sheet,1); 

as result, sheet copied, except style of cell: borders, fonts, text size, text color. how move style?

thank you.

there method built phpexcel this: addexternalsheet() copies styling content 1 workbook another.

there script (43mergeworkbooks.php) demonstrate use in /examples folder of phpexcel


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -