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
yourFile = "test01.xls"
yourUsrID = ""
yourPWD = ""
yourDBname= ""
rename_table = ""
host_name = em.hostname
IP = em.local_ip
yourHostOrIP = "localhost"
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.