Skip to content

Commit 49f8662

Browse files
authored
Merge pull request mk-j#159 from unamatasanatarai/patch-1
Removed unnecessary empty IF, updated cell reference
2 parents 1b528e6 + fd6f141 commit 49f8662

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

example-cli.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,14 @@
55
error_reporting(E_ALL & ~E_NOTICE);
66

77
$filename = "example.xlsx";
8-
$as_command_line = php_sapi_name()!='cli' ? true : false;
9-
if ()
10-
{
11-
header('Content-disposition: attachment; filename="'.XLSXWriter::sanitize_filename($filename).'"');
12-
header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
13-
header('Content-Transfer-Encoding: binary');
14-
header('Cache-Control: must-revalidate');
15-
header('Pragma: public');
16-
}
178

189
$rows = array(
1910
array('2003','1','-50.5','2010-01-01 23:00:00','2012-12-31 23:00:00'),
20-
array('2003','=B2', '23.5','2010-01-01 00:00:00','2012-12-31 00:00:00'),
11+
array('2003','=B1', '23.5','2010-01-01 00:00:00','2012-12-31 00:00:00'),
2112
);
2213
$writer = new XLSXWriter();
2314
$writer->setAuthor('Some Author');
2415
foreach($rows as $row)
2516
$writer->writeSheetRow('Sheet1', $row);
2617

2718
$writer->writeToFile('example.xlsx');
28-
//$writer->writeToStdOut();
29-
//echo $writer->writeToString();
30-
exit(0);
31-

0 commit comments

Comments
 (0)