The version is "PHP Desktop Chrome 31.8 with PHP 5.4.33".
The problem reproduce for extension other than xlsx as well, I have tried .rtf and .doc
Below is my setup to replicate this problem:
- Create a view.php file in the webroot
- Copy a .xlsx file to the webroot, named abc.xlsx
- Edit the view.php to include an <a href="abc.xlsx">Download</a>
- Open PHPDesktop and view the view.php page
- Clicks on the Download link
- A "Save File" dialog will appear to choose the location to save the file, with default file name set to abc.xlsx
- Choose any location but change the file name to xyz (note without the .xlsx extension). I expect this should be fine as the "Save as type" below it is set to "Microsoft Excel..."
- Check the saved file and you will see that the file is without the .xlsx extension (thus unrecognized file type by the OS)
When I right click the Download link and "Open in external browser", it will open my browser and load the view.php page (but not download the .xlsx file).
Note that in step #7 above, if I rename the file to xyz.xlsx, then the file is correctly saved. Initially I suspect this is an acceptable behaviour. But when I open an Excel file using Microsoft Excel, and then click the "Save As..." to trigger the similar dialog, this dialog will correctly save the file even I name the file without the extension.