Hi guys i'm trying to create a simple Excel document so that I can start to understand how to use php with Excel. However, when I run my code i'm getting a fatal error... Fatal error: Call to undefined method PHPExcel::getActiviteSheet() in /home3/hutch/public_html/Murphy/ExcelTransfer.php on line 6
Anyone know how to fix this?
<?php
Include_once 'PHPExcel.php';
$sheet = new PHPExcel();
$activeSheet = $sheet->getActiviteSheet();
$activeSheet->setCellValue('A1','test1');
$activeSheet->setCellValue('B1','test2');
$activeSheet->setCellValue('C1','test3');
$activeSheet->setCellValue('D1','test4');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="report.xlsx"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_I0Factory::createWriter($sheet, 'Excel2007');
$obWriter->save('php://output');
exit;
?>