Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $filename = WWW_ROOT."files/master_report_template/compliance_workflow_master_template.xlsx";
- $reportFileName = WWW_ROOT."files/documents/reports/compliance_workflow_template.xlsx";
- $this->PhpExcel->loadWorksheet($filename);
- $this->PhpExcel->getActiveSheet()->setCellValue('B1',$this->request->data['fromDate']);
- $this->PhpExcel->getActiveSheet()->setCellValue('B2',$this->request->data['toDate']);
- $this->PhpExcel->getActiveSheet()->setCellValue('B3',date('D-M-y'));
- $row=6;
- foreach($repostData as $rows)
- {
- $col = 0;
- foreach($rows as $key =>$value)
- {
- $this->PhpExcel->getActiveSheet()->setCellValueExplicitByColumnAndRow($col, $row, $value);
- $col++;
- }
- $row++;
- }
- $this->PhpExcel->save($reportFileName);
- $this->PhpExcel->output();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement