• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

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
0
Kinderly Wade
Asked:
Kinderly Wade
  • 4
  • 3
1 Solution
 
ThommyCommented:
You should try MySQL for Excel
0
 
ThommyCommented:
0
 
Kinderly WadeAuthor Commented:
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?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ThommyCommented:
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

0
 
Kinderly WadeAuthor Commented:
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.
0
 
ThommyCommented:
Not sure if that works!

But simply try it out...
0
 
Kinderly WadeAuthor Commented:
Thanks Tommy.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now