merge files

Topics: Developer Forum
Jan 19, 2015 at 10:36 AM
Edited Jan 19, 2015 at 10:47 AM
PHPExcel 1.8.0
PHP Version 5.5.9-1ubuntu4.5

Sorry for my English. I'm not very good at it.

I can not understand how to combine multiple files into one. In one worksheet.

Now I do like this (get multiple worksheets in a single file):
$filenames = array($obl, $titul);

$bigExcel = new PHPExcel();

foreach ($filenames as $filename) {
    $excel = PHPExcel_IOFactory::load($filename);   

    foreach ($excel->getAllSheets() as $sheet) {

    foreach ($excel->getNamedRanges() as $namedRange) {

$writer = PHPExcel_IOFactory::createWriter($bigExcel, 'Excel5');

$file_creation_date = date("Y-m-d");

$saving_name = "Report_Name" . $file_creation_date . '.xls';

But I have to get exactly one worksheet.
How to do it?