There are many ways to work with data, here is a quick walkthrough how to transfer data from an Excel file into a database.
Excel-File -> CSV-File -> DBeaver -> PostgreSQL
Excel file
We have a simple Excel file:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image.png)
with a simple sample data structure:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-1.png)
Excel file conversion
We need to convert the Excel file into a .csv (Comma Seperated Values) file.
Just open the file -> Datei -> Exportieren > Dateityp ändern -> CSV
and save as sample.csv
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-2-1024x795.png)
Import from CSV
In DBeaver:
Open Database connection -> database -> schema -> Rightclick -> Data import:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-3.png)
Import from CSV:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-4.png)
Change delimiter (Spaltentrennzeichen) from , to ;
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-6.png)
click "Auto assign", change target to "sample"
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-11.png)
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-13.png)
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-12.png)
TADA! We have a new table "sample" in our database:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-14.png)
Create CSV connection
Let's try another way. Delete table "sample" and create a connection to the CSV file:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-15-1024x651.png)
Click Browse… and select the folder where your csv file is that you saved from Excel. You’re selecting a folder here, not a file. The connection will load ALL csv files in that folder. Click Finish.
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-16.png)
Download the driver, if using for the very first time:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-17.png)
You will now see a new connection; this connection is set up exactly like a regular connection. Each csv file in your folder will be set up as a table with columns.
But there is a problem with the columns, it's just one, not three:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-19.png)
Doublecheck delimiter, but it is already set to ;
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-20.png)
Ah, in driver details we have to set the separator from , to ;
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-21.png)
Looks better now:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-22.png)
Export CSV data into database:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-23.png)
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-24.png)
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-25.png)
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-26.png)
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-27.png)
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-28.png)
Once again we have our sample table in our database:
![](https://ingo.kaulbach.de/wp-content/uploads/2024/03/image-29.png)