adjust code for other library
This commit is contained in:
@@ -522,6 +522,7 @@ function booking_varietysessions_csv_report($timeslot_id) {
|
|||||||
header('Content-Transfer-Encoding: binary');
|
header('Content-Transfer-Encoding: binary');
|
||||||
header('Cache-Control: must-revalidate');
|
header('Cache-Control: must-revalidate');
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
|
/*
|
||||||
$data1 = array(
|
$data1 = array(
|
||||||
array('5','3'),
|
array('5','3'),
|
||||||
array('1','6'),
|
array('1','6'),
|
||||||
@@ -543,6 +544,19 @@ function booking_varietysessions_csv_report($timeslot_id) {
|
|||||||
//$writer->writeToFile('example.xlsx');
|
//$writer->writeToFile('example.xlsx');
|
||||||
//echo $writer->writeToString();
|
//echo $writer->writeToString();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$rows = array(
|
||||||
|
array('2003','1','-50.5','2010-01-01 23:00:00','2012-12-31 23:00:00'),
|
||||||
|
array('2003','=B1', '23.5','2010-01-01 00:00:00','2012-12-31 00:00:00'),
|
||||||
|
);
|
||||||
|
$writer = new XLSXWriter();
|
||||||
|
$writer->setAuthor('Some Author');
|
||||||
|
foreach($rows as $row)
|
||||||
|
$writer->writeSheetRow('Sheet1', $row);
|
||||||
|
$writer->writeToStdOut();
|
||||||
|
exit(0);
|
||||||
|
|
||||||
//verify that $timeslot_id is a number
|
//verify that $timeslot_id is a number
|
||||||
if (! preg_match('/^[0-9]+$/', $timeslot_id)) {
|
if (! preg_match('/^[0-9]+$/', $timeslot_id)) {
|
||||||
|
Reference in New Issue
Block a user