Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. $filename = WWW_ROOT."files/master_report_template/compliance_workflow_master_template.xlsx";
  2. $reportFileName = WWW_ROOT."files/documents/reports/compliance_workflow_template.xlsx";
  3. $this->PhpExcel->loadWorksheet($filename);
  4. $this->PhpExcel->getActiveSheet()->setCellValue('B1',$this->request->data['fromDate']);
  5. $this->PhpExcel->getActiveSheet()->setCellValue('B2',$this->request->data['toDate']);
  6. $this->PhpExcel->getActiveSheet()->setCellValue('B3',date('D-M-y'));
  7. $row=6;
  8. foreach($repostData as $rows)
  9. {
  10. $col = 0;
  11. foreach($rows as $key =>$value)
  12. {
  13. $this->PhpExcel->getActiveSheet()->setCellValueExplicitByColumnAndRow($col, $row, $value);
  14. $col++;
  15. }
  16. $row++;
  17. }
  18. $this->PhpExcel->save($reportFileName);
  19. $this->PhpExcel->output();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement