Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jerryfzhang/exceltosql
Excel to SQL insertion code generator.
https://github.com/jerryfzhang/exceltosql
csv csv-converter csv-import csv-parser insertion sql sql-insert xls
Last synced: 17 days ago
JSON representation
Excel to SQL insertion code generator.
- Host: GitHub
- URL: https://github.com/jerryfzhang/exceltosql
- Owner: JerryFZhang
- License: mit
- Created: 2016-03-29T18:28:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-03T17:13:32.000Z (almost 9 years ago)
- Last Synced: 2024-11-07T03:45:25.262Z (2 months ago)
- Topics: csv, csv-converter, csv-import, csv-parser, insertion, sql, sql-insert, xls
- Language: Python
- Homepage:
- Size: 6.87 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ExcelToSQL
This a program written in python that take an xls file as a input, generate csv code for each sheet stored, and generate SQL insertion code for a quick databse testing.
Some of the cool features including- checking if the file exist or not and then create or wipe the file if necessary
- check the datatype and parse string and int differently# How to use
- There are three ways to download the file:
1. Download the repo as a zip.
2. Download therun.py
file only.
3. Or clone the repo by typing the following command into your terminal:```
git clone https://github.com/zhang96/ExcelToSQL
```
Install the require modules including:- xlrd
- pandasPut the spreadsheet file in the folder and name it as data.xls, make sure it ends with .xls not .xlsx.
- There are two ways to run the file:
1. Run the file IDLE or other IDEs.
2. Set the directory in the terminal and then type the following command into the terminal
```
python run.py
```
#Todo
- Add inline comments
- Code logic optimization
- Support for *.xlsx files insted of only *.xls files.
- Support for other datetypes other thah int and string.
- Eliminate csv intermidiated generation.
- Option to generate all insertion into a single *.sql file.#Author
zhang96#License
MIT, see LICENSE.txt.