PHP Classes

Problem with MySQL XLSX Export

Recommend this page to a friend!

      PHP MySQL XLSX Export  >  All threads  >  Problem with MySQL XLSX Export  >  (Un) Subscribe thread alerts  
Subject:Problem with MySQL XLSX Export
Summary:XLSX Not Created
Messages:6
Author:Frankie P
Date:2013-04-18 14:49:43
Update:2013-04-18 20:49:17
 

  1. Problem with MySQL XLSX Export   Reply   Report abuse  
Picture of Frankie P Frankie P - 2013-04-18 14:49:43
The script is exactly what I have been looking for. The only problem is that it never creates the .xlsx file. When I run the script the data is loaded in to the .xml files, but never opens Excel to create the .xlsx file. Any help would be appreciated. I am using MS Office 2011.

  2. Re: Problem with MySQL XLSX Export   Reply   Report abuse  
Picture of Frankie P Frankie P - 2013-04-18 15:29:57 - In reply to message 1 from Frankie P
In my last post I neglected to state that the data does not display in the browser either. I can drag and drop the newly created .xml files on to Excel on the desktop and all data is properly imported.

  3. Re: Problem with MySQL XLSX Export   Reply   Report abuse  
Picture of Gianluca Zanferrari Gianluca Zanferrari - 2013-04-18 15:30:27 - In reply to message 1 from Frankie P
Hi, it's correct. May be it is a little bit confusion about that cause the description of the class and functionalities has been modified by the site owner/moderator. By the way the class creates a .xml file that you can open in excel or libre office. If you choose for output to browser, it will trigger the office package. I tested it in win 7 and xubuntu. Both were working fine.

  4. Re: Problem with MySQL XLSX Export   Reply   Report abuse  
Picture of Frankie P Frankie P - 2013-04-18 15:42:53 - In reply to message 3 from Gianluca Zanferrari
Thanks for the quick reply. Uou state if I choose to output to browser. How do you choose this? The xml file are created correctly just no browser or Excel.

  5. Re: Problem with MySQL XLSX Export   Reply   Report abuse  
Picture of Gianluca Zanferrari Gianluca Zanferrari - 2013-04-18 19:42:00 - In reply to message 4 from Frankie P
Hi, see the example below:

$xls_xml->long_query('dbase_name','SELECT * FROM table_name WHERE field_1 > 0 AND field_1 < 100 ORDER BY field_1 LIMIT 1');
$xls_xml->save_as('output_long.xml');

/*
* send the output to browser and triggers the office software. Tested with MS Office 2007 and libre office 3.6.2.2
*/
$xls_xml->to_excel('output_to_browser.xml');

  6. Re: Problem with MySQL XLSX Export   Reply   Report abuse  
Picture of Frankie P Frankie P - 2013-04-18 20:49:17 - In reply to message 5 from Gianluca Zanferrari
Thanks again for your reply.

My problem was Excel was not the default app for .xml files.
I changed from Xcode to Excel and it is working prefectly.

Thanks and have a great day,
Frank