I have a rather peculiar issue which appears to be related to excel formatting.
I have a Laravel 5.0 application and there's an Excel 97 (xlsx) download function using maatwebsite excel wrapper which works fine on my local MAMP platform as well on my CentOS VPS using a demo sub-domain on http:// connection.
But when I deployed the application to another folder and set it up to be served up by another subdomain on https:// connection on the same VPS, I get this error:
Excel cannot open this file.
The file format or file extension is not valid.
Verify that the file has not been corrupted and
that file extension matches the format of the file.
Any ideas what could be wrong?
Please note that exactly the same code works on the same server in a different folder under a different sub-domain on http:// protocol.
I even tried to create a basic file to eliminate data related issues but still get the same error, here's the test code I used:
Excel::create('Filename', function($excel) {
$excel->setTitle('Our new awesome title');
$excel->setCreator('Maatwebsite')
->setCompany('Maatwebsite');
$excel->setDescription('A demonstration to change the file properties');
})->export('xlsx');
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2bpdX9m
via IFTTT
Aucun commentaire:
Enregistrer un commentaire