How to export the data from mysql as xlsx, mysql workbranch only support export as CSV as i see in workbranch.
I wan to have some programme which can directly get an mysql stored procedures result as .XLSX format file. Any Idea?
How to export the data from mysql as xlsx, mysql workbranch only support export as CSV as i see in workbranch.
I wan to have some programme which can directly get an mysql stored procedures result as .XLSX format file. Any Idea?
3
Answers
If you’re using python, you can use pandas to read the MySQL database into a dataframe and then export it to an excel file using the
to_excel
function.This worked for me — You need to create the csv file first
SELECT
actor
.actor_id
,
actor
.first_name
,
actor
.last_name
,
actor
.last_update
FROM
sakila
.actor
INTO OUTFILE ‘C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/actor.txt’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘"’ LINES TERMINATED BY ‘rn’