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
2. After creating the database:
Double-click to open it and there will be The following structure
3. Save your table as a .csv file, right-click "Table" and select Import Wizard
4. Select the source file
##You can adjust the table structure here to meet your needs. If there is no need to modify it, just take the next step 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!