This package help to convert your excel files (xlsx,xls,csv) to SQL Server database.
Project description
Introduction
This package help to convert your excel files (xlsx,xls,csv) to SQL Server database.
Installation
exceltomysql can be installed as:
pip install exceltosqlserver
Dependency
👍 pandas
👍 pyodbc
QuickStart
import exceltosqlserver as es
# generate the class instance
# STEP One, prepare your input pareameters
yourFile = "test01.xls" # available for xlsx, xls,csv
yourUsrID = ""
yourPWD = ""
yourDBname= ""
save2tableName = False # save your file name table name onto SQL Server or A string like: "test"
# get your local host name
# this will return your local computer name for your sql server database
host_name = es.hostname
# get your local ip address
# this will return your local ip address (if your sql server can be accessed by DNS)
ip = es.local_ip
# you need to change your host if needed, dns: local ip address
#yourHostORip = "localhost"
# yourHostORip = host_name
yourHostORip = ip
# STEP Two convert your data to sql server
es.exceltoDBtable(yourFile,yourHostORip,yourUsrID,yourPWD,yourDBname,save2tableName)
output:
Successfully load excel data...
Secessfully connected to SQL Server...
Secessfully saved 'yourtable' into SQL Server...
API Reference
exceltosqlserver.exceltoDBtable(filePath,hostORip=False,usrID =False,pwd=False,database=False,save2tableName
)
filePath: str
hostORip: str default :False
usrID: str default: False
pwd: str default: False
database: str default:False
save2tableName: str default:False, will auto save your file name as table name into mysql database. If assignmed value, will change table name from your file name 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
Hashes for exceltosqlserver-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0a75a603a901b2130573c39ba1724105f04836b5e6b0406232a46a3f4af5129 |
|
MD5 | 6d1ad117db954db3f23cfbe6d18d3f46 |
|
BLAKE2b-256 | bff3c49d76f8dfce4bc78990330fc270c6653ca58910f16dd46b5bb905888398 |