Import data from excel table into mysql data

Required tools: excel, mysql, Navicat for MySQL
1. Table in mysql database. After the table is created, you need to tell the field name in the table to the person who fills in the excel table.
write picture description here
2. Open the excel table and follow the instructions provided by the program. Fill in the corresponding data in the fields. At this time, pay attention to the following points: the name (I marked it in red) needs to be the same as that provided by the program, and other descriptions and headers can be omitted.
write picture description here
3. The mysql management tool used is Navicat For MySQL, open the tool, select which table to import, right-click on that table, and select import wizard. A selection interface pops up, we select the excel file file
write picture description here
write picture description here
4, click next (next), we select our The corresponding excel file is fine, and then choose which sheet our file content is in, that is, where your content is written in excel, you need to pay attention to this, my content is in sheet1, so I choose sheet1, such as Figure:
write picture description here
5. Click next (this step is also a key step), you need to pay attention to 2 points:
①: filed name row is the position in excel where your field is located, which is the row (simple way, usually the column corresponding to English) ).
②: first data row (from which row to start execution), which row does the data start from, I chose 2, 3 here.
③: last data row: which row stops the data execution, and executes all data
write picture description here
6 if it is empty , Click next, we select the database corresponding to the target table target, and select which database table you want to import.
write picture description here
7. If there is no problem with the above step, we default to next to the end. Then open the table and you can see the data and excel same as in the table.
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325648636&siteId=291194637