Home >Database >navicat >How to batch import excel table data in navicat

How to batch import excel table data in navicat

王林
王林forward
2020-11-20 16:20:5217407browse

How to batch import excel table data in navicat

Background:

First of all, I tried to import excel directly. Since there were more than 200,000 rows of data to be imported, only tens of thousands of rows were imported in the end. Therefore, I tried saving the .xlsx file as a .csv file and the import was successful.

(Recommended tutorial: navicat)

The specific steps are as follows:

1. Create a connection

I chose SQLite here , it depends on the database you want to use

How to batch import excel table data in navicat

How to batch import excel table data in navicat

2. After creating the database:

Double-click to open it and there will be The following structure

How to batch import excel table data in navicat

3. Save your table as a .csv file, right-click "Table" and select Import Wizard

How to batch import excel table data in navicat

How to batch import excel table data in navicat

4. Select the source file

How to batch import excel table data in navicat

How to batch import excel table data in navicat

How to batch import excel table data in navicat

How to batch import excel table data in navicat

##You can adjust the table structure here to meet your needs. If there is no need to modify it, just take the next step

How to batch import excel table data in navicat

The import is complete!

A problem encountered:

There are several rows of data import errors, [Err] [Imp] 1 - unrecognized token: "'xxxxx".

Error analysis:

This is because there are spaces in my table. At this time, just remove the spaces in the original table. Note that the operation of removing spaces here needs to be modified in the .xlsx file. Modifying it in .csv will cause data problems and you may not notice it. How did I find out? Because after changing the .csv, all the 0s in the data starting with 0 in it were gone.

The above is the detailed content of How to batch import excel table data in navicat. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete