-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
68 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
from ._api import * | ||
|
||
print("Version: 0.2.1") | ||
print("Version: 0.2.5") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
Metadata-Version: 2.1 | ||
Name: exceltosqlserver | ||
Version: 0.2.1 | ||
Version: 0.2.5 | ||
Summary: This package help convert your excel files (xlsx,xls,csv) to SQL Server Database. | ||
Home-page: https://github.com/Xiangyongluo/exceltosqlserver | ||
Author: Xiangyong Luo | ||
Author-email: [email protected] | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Requires-Python: >=3.6 | ||
Requires-Python: >=3.10 | ||
Description-Content-Type: text/markdown | ||
License-File: LICENSE | ||
|
||
|
@@ -18,7 +18,7 @@ This package help to convert your excel files (xlsx,xls,csv) to SQL Server datab | |
|
||
# Installation | ||
|
||
exceltomysql can be installed as: | ||
exceltosqlserver can be installed as: | ||
|
||
```python | ||
pip install exceltosqlserver | ||
|
@@ -35,8 +35,7 @@ pip install exceltosqlserver | |
# QuickStart | ||
|
||
```python | ||
import exceltosqlserver as es | ||
# generate the class instance | ||
from exceltosqlserver import ExcelToDB, hostname, local_ip | ||
|
||
# STEP One, prepare your input pareameters | ||
|
||
|
@@ -48,11 +47,11 @@ rename_table = "" # Use your filename as tablename onto SQL Server or user defi | |
|
||
# get your local host name | ||
# this will return your local computer name for your sql server database | ||
host_name = es.hostname | ||
host_name = 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 | ||
ip = local_ip | ||
|
||
# you need to change your host if needed, dns: local ip address | ||
#yourHostORip = "localhost" | ||
|
@@ -61,8 +60,8 @@ yourHostORip = ip | |
|
||
|
||
# STEP Two add your data to sql server | ||
es.exceltoDBtable(yourFile, yourHostORip, yourUsrID, yourPWD, yourDBname, rename_table) | ||
|
||
es = ExcelToDB(yourFile, yourHostORip, yourUsrID, yourPWD, yourDBname, rename_table) | ||
es.save2db() | ||
|
||
``` | ||
|
||
|
@@ -75,16 +74,16 @@ Sucessfully saved 'yourtable' to SQL Server... | |
|
||
# API Reference | ||
|
||
exceltosqlserver.exceltoDBtable(`filePath,hostORip=False,usrID =False,pwd=False,database=False,rename_table`) | ||
exceltosqlserver.ExcelToDB(`filePath,host_ip=False,usrID =False,pwd=False,db_name=False,rename_table`) | ||
|
||
filePath: str | ||
|
||
hostORip: str default: "" | ||
host_ip: str default: "" | ||
|
||
usrID: str default: "" | ||
|
||
pwd: str default: "" | ||
|
||
database: str default: "" | ||
db_name: str default: "" | ||
|
||
rename_table: str default: "", will auto save your filename as table name to sql server database. If assignmed value, will change table name from your filename to the assigned value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters