PHPExcel : Working With Excel Spreadsheet in PHP #2 Download PHP Generated Excel File

preview_player
Показать описание
Attention: if you find my voice incomprehensible. please turn on subtitle or closed-caption. (using button labeled CC in the video setting)
Attention2: PHPExcel are deprecated, please consider using PHPSpreadsheet instead. Both are developed by same developer and PHPSpreadsheet is the successor of PHPExcel.

Welcome to second chapter of PHPExcel tutorial.
In this chapter, we're about to download the generated excel spreadsheet file instead of just saving it in server side.
We'll also try to save the generated excel file in different formats, Excel 2007 (xlsx) and Excel 2003 (xls).

this is the header strings:
(sorry, pasting scripts here seems to be a problem, I'll move it in my blog instead. Check out link below)
get the whole script here :

Рекомендации по теме
Комментарии
Автор

Thanks for the video! I need to just edit the file. That is, altering
only the specified columns and keeping the data that was previously
there

bricegnanago
Автор

Good morning, I've seen your video and I did everything like on the video. I can create de excel file but when I want to download it doesn't show the dialog for save the file and on the console print something like this ---> Please if you could help me I'll be thankfull

jhancarloyturreguimena
Автор

i get some errors when opening the excel file

Notice: Undefined variable: excel in C:\xampp\htdocs\PHP\print.php on line 28

Catchable fatal error: Argument 1 passed to must be an instance of PHPExcel, null given, called in C:\xampp\htdocs\PHP\print.php on line 28 and defined in on line 129

gerwenjacobgaceta
Автор

On this excercise i get an error message that excel can not open file, because the file format or file extension is not valid ? How to fix that

dimitrijenanusevski
Автор

cant open the file

header('Content-Type:
header('Content-Disposition: attachment; filename="test.xls"');



$file = PHPExcel_IOFactory::createWriter($excel, 'Excel5');
$file ->save('php://output');

vishnudasks
Автор

If I want to listen to music during My tutorial video I will turn On My radio my self i can hardly hear what your talking about

bramnekkers
Автор

Thanks for the video! I need to just edit the file. That is, altering
only the specified columns and keeping the data that was previously
there

bricegnanago