Generating Excel files from templates (read, modify, write)

Hi,

I want to generate excel files from a template:

  1. Open an Excel file

  2. Filling a few cells

  3. Save the file

I found this extension PHPExcel. But I think it lacks that thing.

Is possible with the original extension :




$objPHPexcel = PHPExcel_IOFactory::load('template.xlsx');


$objWorksheet = $objPHPexcel->getActiveSheet();

$objWorksheet->getCell('A1')->setValue('John');

$objWorksheet->getCell('A2')->setValue('Smith');


$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, 'Excel5');

$objWriter->save('write.xls');



Any idea?

Thanks and regards.

Once I did this work, and I used raw phpExcel.