Git Product home page Git Product logo

exceltosql's Introduction

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 the run.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
  • pandas

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:
    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.

exceltosql's People

Contributors

jerryfzhang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

xueqingsun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.