Skip to main content

Introduction

This package help to convert your excel files (xlsx,xls,csv) to MySQL Server database.

Installation

exceltomysql can be installed as:

Windows:

pip install exceltomysql

Dependency

👍 pandas

👍 pymysql

👍 sqlalchemy

QuickStart

from exceltomysql import ExcelToDB

# Step 1, prepare your input pareameters

yourFile  = "test01.xls"  # available for xlsx, xls,csv
yourUsrID = ""
yourPWD   = ""
yourDBname= ""
rename_table = ""  # Use your filename as tablename to MySQL Server or user define their prefered table name. e.g. : "test"

# get your local host name
# this will return your local computer name for your MySQL server database
host_name = em.hostname

# get your local ip address
# this will return your local ip address (if your sql server can be accessed by DNS)
IP = em.local_ip
yourHostOrIP  = "localhost"   # you need to change your host if needed, dns: local ip address

# Step 2, save your data onto MySQL
ex = ExcelToDB(yourFile, yourHoseOrIP, yourUsrID, yourPWD, yourDBname, rename_table)
ex.save2db()
output:
Successfully load excel data...
Secessfully connected to MySQL Server...
Secessfully saved 'yourtable' to MySQL Server...

API Reference

exceltomysql.ExcelToDB(filePath, host_ip ="", usrID = "", pwd = "", db_name = "", rename_table = "")

filePath: str

hostORip: str default :""

usrID: str default: ""

pwd: str default: ""

db_name: str default: ""

rename_table: str default: "", will auto save your filename as tablename to MySQL Database. If assignmed value, will change tablename from your filename to the assigned value.

Release files for exceltomysql 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exceltomysql 0.2.3
File Size Uploaded
exceltomysql-0.2.3.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for exceltomysql 0.2.3
File Interpreter ABI Platform
exceltomysql-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size:9.2 kB

Release files / exceltomysql-0.2.3.tar.gz

Download URL exceltomysql-0.2.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
33ecb62abf87e331cbaa2641ddbec12bad6a6c453702ff29762e38b5944c1a41
BLAKE2b-256 checksum
How to use checksums
41f0798f64c0f62f0587b85604a35d8f24a2be0491b21d838725244ef83555b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / exceltomysql-0.2.3-py3-none-any.whl

Download URL exceltomysql-0.2.3-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
360225aaf53193ff37c0ff4c5e48bd4a375b0b6b038d78beb8adcbb3035efff0
BLAKE2b-256 checksum
How to use checksums
f7ed0a78b498fa44f69eb5a53982e65f6071cc1c446761b611df8b5914d14cb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page