DEV Community

ryjfgjl
ryjfgjl

Posted on

2

Batch import of multiple excel files into the database

Batch import of multiple excel files into the database

Abstract: If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming to manually import one by one. Here we use ExcelToDatabaseTools can be directly imported in batches, and it is just fine to hand over all to the tools for automatic import, completely freeing your hands!

Example of use

As shown in the figure, I need to import all excel files under the folder into the database

Image description

There are two ways to select excel. One is to select the excel file to be imported, and the other is to select the directory. If the directory is selected, all excel files under the directory will be imported. When selecting a directory, if Excel of the subdirectory under the directory also needs to be imported, you can check the Traverse Subdirectory option in the Excel Options interface

Method 1: Select files

Image description

As shown in the figure, six files are selected here, click Start, and six files will be imported into the database in one second

Image description

Note that the file contains three sheets, so you can see that the table name is followed by the sheet name

Mode 2: Select directory

Image description

Note: When you select a directory, you cannot see the specific Excel file, but only the directory name. We just need to go to the upper directory containing the Excel file and select the directory

We can see that there is a new folder under the directory. By default, Excel under the new folder will not be imported. If we want to import the Excel files under the new folder as well, we can check the Traverse Subdirectory option under the Excel option.

Image description

ExcelToDatabase Introduction and Download

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay