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:
- Download the repo as a zip.
- Download the
- Or clone the repo by typing the following command into your terminal:
git clone https://github.com/zhang96/ExcelToSQL
Install the require modules including:
Put 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:
- Run the file IDLE or other IDEs.
- Set the directory in the terminal and then type the following command into the terminal
- 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.
#License MIT, see LICENSE.txt.