A
A
Alexis_D2019-02-01 08:33:15
MySQL
Alexis_D, 2019-02-01 08:33:15

How can I export data from MySQL?

Good day, how can I export data from a MySQL table to an excel file? Maybe someone has links where you can read how this thing is done.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey Gornostaev, 2019-02-01
@sergey-gornostaev

By the "python" tag, you want to do this with a script. You need to learn the principles of working with databases from Python (DB API) to get data and work with the openpyxl library to generate an Excel document.

I
ivankomolin, 2019-02-01
@ivankomolin

https://www.mysql.com/why-mysql/windows/excel/

O
Oleg, 2019-02-01
@OlegPyatakov

There are many options (depending on the goals):

  • If you use GUI utilities for SQL database, then there is an opportunity to export to csv / Excel (for example, exactly in Heidi SQL)
  • In Excel itself, you can install a connector to MySQL and import data with a query
  • In Python, you can make a request for data and then write to csv through the standard library of the language

S
sash999, 2019-02-01
@sash999

You can pull out the data and then push it into xls without any intermediate csv. Look towards the python module xlwt.
And if without a python, then I use libreoffice under Linux for such things. Very convenient, we write / draw a query to the database in the wizard and then just drag-and-drop to an excel file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question