Avatar of Richard Korts
Richard Korts
Flag for United States of America asked on

Download Excel Message

See attached message.

I get this every time I download an Excel spreadsheet generated in php with the following header:

header("Content-type: application/vnd.ms-excel");
$fn = "registrants" . date('Y-m-d_h_i') . ".xls";
header("Content-Disposition: attachment; filename=" . $fn);

If I change the file extension to xlsx will that solve this?

Thanks
excel-message.jpg
PHP

Avatar of undefined
Last Comment
Richard Korts

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Richard Korts

ASKER
Ray,

the spreadsheet is fine; it downloads & opens fine in Excel 16.

it's just the confusing message.

the customer gets confused.

Richard
Your help has saved me hundreds of hours of internet surfing.
fblack61