- python E:\Python\Project\python-excelimporter\interface.py
Database Name: Re-Create Database: if selected, tool will drop and create database, otherwise, tool will default the database is existing.
File Directionary: Choose your files directionary. The excel/csv files under this directionary will be imported.
Replace Values: the value seperated by comma will be replaced to null
CSV Encoding: We can get the encoding from the excel file, but we can not do this from csv file. So we can only detect the encoding from csv. If you know the encoding of all the csv files and they are the same one encoding, you can choose/populate this field. The tool will prefer to use this encoding.
The problem solved by tool when we import excel into mysql database:
- The length of Column Name more than 64 characters. ==> cut off
- The Column Name inculde space on the first/end. ==> remove space
- The repeatable column name. ==> add suffix
- The length of column is too large(>255) ==> change the column from varchar(255) to text.
- The row size is too large(>65535) ==> change all column from varchar(255) to text.
- remove the space before/end the data.
- change all "" character to null.
- detect encoding from csv and get encoding from excel.
- import all sheets from excel.(if more than one sheets in the excel, table name will be excel name+_+sheet name)
- The length of Table Name more than 64 characters. ==> cut off
- skip empty excel.
- skip blank row.
- support import utf8mb4 character
- support chinese windows
you can use Cx-Freeze to build it to a exe.
cmd: cd E:\Python\Project\python-excelimporter python E:\Python\Project\python-excelimporter\setup.py build.
If you have no python on your computer, you can also contact me to get .exe program which can run without python.
The description is so simple. Please email me if you have any question.
author: ryjfgjl email: [email protected]