How to batch import data into the database using excel? Just read this article! Super detailed


Application scenarios

When we encounter the need to add new database entries in batches

1. You can write an interface to import using excel, which can be automated, but only if you know the tables and processes you want to add.

2. You can use excel to directly import the database

Excel import database

新增:把你的字段都打上(是全部字段excel和数据库字段必须顺序数量名字一致 )

编辑:excel的某一列命对应你的表的主键,然后写上你想改的字段名和值

删除:同编辑



Ⅰ: Create a new excel file

Insert image description here

Insert image description here




Ⅱ: Fill your data into excel, open the database, click on the table of the database, right-click on the computer, and select the import wizard (I used MySql to test)

Insert image description here



III: Open the wizard and select Excel File (that is, import the excel file type)

Insert image description here


IV: Select the file you want to import, and then check your sheet. If you want to insert multiple tables at once, just create multiple sheets and check them.

Insert image description here
Insert image description here
Insert image description here
Insert image description here


Ⅴ: In fact, there are not only these 新增, but 复制、删除also 修改functions. It depends on which one you choose. The one I choose now is to add new ones.

Insert image description here

Translated it means the following:

Insert image description here

END

Guess you like

Origin blog.csdn.net/twotwo22222/article/details/126267556