Link to home
Start Free TrialLog in
Avatar of Kinderly Wade
Kinderly WadeFlag for United States of America

asked on

convert mysql to excel file version 4.0 or below in linux

Dear experts,

Is there other ways of convert mysql data into excel file or a better and easy way?

These are the methods that I know of:
1. using phpExcel (a php converter program)
2. using mysql OUTFILE command and dump the data into .xls file

I am trying to create an excel file from the data store inside mysql. The excel file has to be version 4.0 or below or else the other program will not recognize the file format.

Is there a mysql2excel command that I can use in linux which can get the job done? (concept is from dbf2mysql) If not is there a similar program that can perform the function of converting mysql data into excel?

Thanks
Avatar of Thommy
Thommy
Flag of Germany image

You should try MySQL for Excel
Avatar of Kinderly Wade

ASKER

Hi Thommy,

Is there other ways that I can integrate the process of excel file generation into my code with a simple button click? I tried the MySQL for Excel. It is really good to extract data from MYSQL but I don't think I can setup a store procedure or function that can carry out the process of which database that I wish to extract my data from right? It is more like a manual process that needs to be done instead of automated process which can be simplified with a button click?
You may also directly output MySQL query results into csv format files for Excel:


For example like that:
SELECT idno, employee_name,salary FROM salaries
INTO OUTFILE '/temp/salaries.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'

Open in new window

Is it possible that I can do this:

SELECT idno, employee_name,salary FROM salaries
INTO OUTFILE '/temp/salaries.xls'
FIELDS TERMINATED BY '\t'
ENCLOSED BY '"'
LINES TERMINATED BY '\n'

Will this give me a readable output excel file or or it is better to go with csv?

I read up the mysql OUTFILE which it supports csv and txt.
ASKER CERTIFIED SOLUTION
Avatar of Thommy
Thommy
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Tommy.