This package help convert your excel files (xlsx,xls,csv) to MySQL Database.
Project description
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
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file exceltomysql-0.2.3.tar.gz
.
File metadata
- Download URL: exceltomysql-0.2.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ecb62abf87e331cbaa2641ddbec12bad6a6c453702ff29762e38b5944c1a41 |
|
MD5 | 5a5f8de8e518c59e640a8e1ab42d74cc |
|
BLAKE2b-256 | 41f0798f64c0f62f0587b85604a35d8f24a2be0491b21d838725244ef83555b7 |
File details
Details for the file exceltomysql-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: exceltomysql-0.2.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 360225aaf53193ff37c0ff4c5e48bd4a375b0b6b038d78beb8adcbb3035efff0 |
|
MD5 | 41677230e476a564022ec0daa8dfadf2 |
|
BLAKE2b-256 | f7ed0a78b498fa44f69eb5a53982e65f6071cc1c446761b611df8b5914d14cb0 |