puiu91
12/30/2017 - 6:05 AM

Export csv example from buffer

Export csv from buffer

<?php

header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment;Filename=spreadsheet.xls");

echo 'First Name' . "\t" . 'Last Name' . "\t" . 'Phone' . "\n";
echo 'John' . "\t" . 'Doe' . "\t" . '555-5555' . "\n";