/xlsx-from-sql

Export your SQL query results to an Excel file

Primary LanguagePython

XLSX from SQL

For older versions of Microsoft Excel

For newer versions, read this

Setup

Estabilish a connection

  • host: The hostname of the database you are connecting to (Default: localhost)
  • userS: The MySQL user to authenticate as
  • passwordS: The password of that MySQL user
  • databaseS: Name of the database to use for this connection
  • portS: The port number to connect to

table: The output table's name

query_count: A count query to count the number of rows produced by the query (for the progress bar)

query: The SQL query

Usage

To install dependencies

pip install requirements.txt

To run

python export.py