API Reference¶
exceltopostgresql.ExcelToDB¶
- class exceltopostgresql.exceltopostgresql.ExcelToDB(filePath: str, host_ip: str = '', usrID: str = '', pwd: str = '', database_name: str = '', port: str = '5432', rename_table: str = '')¶
Bases:
objectThis is a model to automatically save your local excel file (xlsx,xls,csv) to your Postgresql Database define inputs variables
- Parameters:
filePath (str) – [path of your input file name]
host_ip (bool, optional) – the ip of your host machine. Defaults to “”.
usrID (bool, optional) – user id of your postgresql database. Defaults to “”.
pwd (bool, optional) – password of your postgresql database. Defaults to “”.
database_name (bool, optional) – the exact database name you want your data save to. Defaults to “”.
port (str, optional) – the postgresql port. Defaults to “5432”.
rename_table (bool, optional) – rename your input table. if “”, will use exact the same table name of your input file. Defaults to “”.
- Raises:
Exception – [if the inputs in not correct then raise exceptions]: Partially inputs, please check your inputs…
- save2db()¶