I recently studied the public platform. The boss handed in a temporary task to import the data in the excel table to the SQL database. I think this is so easy. I spent two days on it...
Introduction: the database has the following table (table)
I only retrieve key columns and there is a lot of data in them.
There is an excel file (table B) that compares id and name with N structured excel tables (Table C) (the column without id)
My task finds the id corresponding to the data in Table C in Table B, then adds the id to Table C, and finally is unique according to the id, use the data in Table C to update the data in table. Conversion between an excel table and a database table is involved here.
Solution 1: use excel + MySQL for Excel
MySQL for Excel is a plug-in for directly operating mysql Databases in excel. You can modify the database like modifying an excel table, or merge tables. Install the plug-in.
When using this, I encountered a problem. MySQL for Excel can connect to a local database, but the database on the server is always not connected .... Solution 1 bankruptcy
Solution 2: import an excel table to the database and use SQL statements to perform operations.
Note that 2.1 indicates that the mobile phone number in the excel table must be set to the text format, and the second is to use traditional Chinese characters. When space is garbled, delete the space and rewrite the input.