Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how-to-generate-an-xlsx-using-php

$file = "test.csv";
 header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
 header('Content-Disposition: attachment; filename='.$file);
 $content = "Col1,Col2,Col3
";
 $content .= "test1,test1,test3
";
 $content .= "testtest,ttesttest2,testtest3
";
 echo $content;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+7 =