https://github.com/fomuon/excel-export
A command-line tool (and python library) to extract sqlite db from excel files
https://github.com/fomuon/excel-export
Last synced: 3 months ago
JSON representation
A command-line tool (and python library) to extract sqlite db from excel files
- Host: GitHub
- URL: https://github.com/fomuon/excel-export
- Owner: fomuon
- Created: 2016-05-19T06:45:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T01:24:59.000Z (over 7 years ago)
- Last Synced: 2024-09-17T01:44:34.132Z (5 months ago)
- Language: Python
- Homepage:
- Size: 118 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - fomuon/excel-export - A command-line tool (and python library) to extract sqlite db from excel files (Python)
README
# excel-export
포멧 정보가 포함된 엑셀 파일로부터 table 별로 분리된 정보를 sqlite db 와 sql text 파일로 추출한다.## Installation
```
$pip install excel-export
```
or
```
$pip install git+https://github.com/fomuon/excel-export.git
```## Command-Line 사용법
sample_excel.xlsx에 정의된 sample_table, sample_table2, sample_table3 테이블을 query script 로 출력한다.
```
$ excel-export -I sample_excel.xlsx --sqlite-output script.sql --mysql-output script2.sql
```## 워크시트내 작성 규칙
* 1행에 반드시 테이블명을 다음 패턴으로 작성하고 그 아래 작성되는 컬럼정보의 열에 맞게 셀병합 한다.
* EXP:$table_name:$설명
* 2행에는 컬럼 정보 작성 또는 컬럼 설명을 작성한다. 컬럼 설명을 작성하였다면 3행에 컬럼 정보를 작성한다.
* $column_name:@TYPE:PK(optional)
* @TYPE : I - Integer, T - Text, N - Numeric, D - DateTime
* PK : Primary Key로 설정할 컬럼
* 3행 또는 4행부터는 데이터행이며 셀병합된 열의 값은 모두 같은 값으로 처리된다.
* 작성예제
* 추출 결과 : https://github.com/fomuon/excel-export/blob/master/sample_excel.sql