How to Export Data from DBeaver to Excel

Cody Schneider8 min read

You’ve run the perfect SQL query in DBeaver and the result set is staring back at you - clean, filtered, and ready for action. The only problem? Your boss, your client, or your teammate needs it in Excel. This article will show you exactly how to get your data from DBeaver into a spreadsheet, covering everything from quick copy-pastes to the more powerful and reliable built-in export tools.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

First, A Quick Pre-Export Checklist

Before you even click "export," a few seconds of prep can save you a headache later. Taking a moment to consider these points ensures your data arrives in Excel exactly as you expect it to.

  • Finalize Your Query: Make sure the SQL query you've run is pulling the final dataset. Have you included all the necessary columns? Is your WHERE clause correct? Running the export is much cleaner than having to do it twice because you forgot to add a join.
  • Consider Data Volume: How much data are you exporting? If it's a few hundred rows, almost any method will work. If it's tens of thousands, you’ll want to use the most efficient export methods. And remember, Excel has a hard limit of 1,048,576 rows. If your dataset is larger, you'll need to export it in chunks or rethink your approach.
  • Check Data Types: Take a quick look at your columns. Do you have dates, timestamps, or numbers with leading zeros (like ZIP codes or ID numbers)? These are the fields that Excel loves to auto-format incorrectly. Being aware of them now will help you troubleshoot if they don’t look right after the export.

Method 1: The Fast Lane (Copy & Paste for Small Datasets)

For quick, one-off analyses or sharing a small snippet of data, you can't beat the simplicity of a good old copy and paste. DBeaver has a couple of ways to do this.

First, run your query in the SQL Editor to get your results in the data grid. Then, select the rows you want to export.

  • For just a few rows, you can click and drag.
  • To select all rows, click anywhere in the results grid and press Ctrl+A (Windows/Linux) or Cmd+A (Mac).

Once your data is selected, you have two primary options for copying:

  1. Standard Copy (Ctrl+C or Cmd+C): This copies the data in a tab-separated format, which is generally what you want for pasting directly into Excel. When you paste it into a blank worksheet, Excel should automatically separate the data into the correct columns.
  2. Advanced Copy (Ctrl+Shift+C or Cmd+Shift+C): This opens up a dialog with more options. You can choose your format (like tab-separated or comma-separated) and decide whether or not to include column headers. This is handy if you only want the data without the field names.

After copying, simply open Excel, click on the A1 cell (or wherever you want the data to start), and press Ctrl+V (or Cmd+V) to paste. For small datasets, this is often the fastest way to get your work done.

When to use this method:

  • You need to move less than a few thousand rows.
  • You're doing a quick, informal data pull.
  • Your data types are simple (text and basic numbers).
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: The "Official" Way - Using DBeaver's Export Wizard

When you have a larger dataset, need more control over formatting, or want a more reliable process, DBeaver's built-in Data Export wizard is the best tool for the job. This gives you fine-grained control over the output, ensuring your data arrives in perfect shape.

Here’s the step-by-step process:

1. Initiate the Export

With your query results visible in the grid, right-click anywhere in the grid. From the context menu, select Export data. This will launch the "Data transfer" wizard.

2. Choose Your Export Format (CSV vs. XLSX)

The first screen asks you to choose a data transfer target. For Excel, you have two excellent choices:

  • CSV: The most universal format. A CSV is a simple text file where values are separated by a delimiter (usually a comma). It's great for compatibility, but it doesn't preserve any special formatting like cell types or column widths.
  • XLSX: The modern native Excel format. This is often the better choice because it creates a true Excel file. DBeaver can export data types directly (e.g., number fields as numbers, date fields as dates), saving you from potential formatting issues with leading zeros or scrambled dates.

For this guide, we'll focus on XLSX since it tends to be more direct. Select "XLSX" and click "Next."

3. Configure Formatter Settings

Here you get to customize how your Excel file is created. The options are straightforward but powerful:

  • Datasheet: By default, it's named "Sheet1" but you can change it here.
  • Header: Check "Export header" to include column names in the first row. Highly recommended!
  • Content type matching: Leave "Auto" selected. This allows DBeaver to intelligently format cells as dates, numbers, or text based on the database's schema. This is a key advantage of the XLSX export.
  • Appearance: "Autofit column width" is a fantastic option that automatically adjusts column sizes in Excel to fit your data, preventing text from being hidden.
  • Rows to Export: You can choose "All rows," only the "Selected rows" from the grid, or a "Custom" range (e.g., the first 5,000 rows).

Once you’ve configured these settings, click "Next."

4. Set Your Output Destination

This is where you tell DBeaver where to save the file.

  • Save to: Choose "File system" to save it to your local computer.
  • File name pattern: DBeaver provides a useful default name like {table}_{timestamp}. You can change this to whatever you like. For example, Q3_Sales_Report_{timestamp}.
  • Directory: Click the "Browse..." button to select the folder where you want to save your file.

Review the options here, especially the file name and directory, then click "Next."

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

5. Confirm and Run

The final screen gives you a summary of your entire export configuration. Take a moment to review everything: the source, the target format, the formatter settings, and the output file location.

If it all looks good, click "Proceed" to start the export. DBeaver will show you a progress window, and once complete, you'll find your perfectly formatted Excel file waiting for you in the folder you selected.

Bonus Pro-Tips for Common Export Problems

Sometimes, even with the best tools, you run into small quirks when moving data between systems. Here’s how to solve a few common issues that pop up when exporting to Excel.

Problem: "My numbers with leading zeros are gone!" (e.g., ZIP code 01234 becomes 1234)

Solution: This happens because Excel sees the number and eagerly formats it as a standard integer. The best way to prevent this is by exporting to XLSX and ensuring "Content type matching" is on. If your database field is a text type (like VARCHAR), DBeaver will tell Excel to treat it as text. If you must use CSV and are opening it in Excel, use the "Data > From Text/CSV" import wizard in Excel, which lets you specify the data type for each column during the import process. You can select the column with leading zeros and set its type to "Text."

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Problem: "My data is all crammed into the first column!"

Solution: This is a classic CSV issue caused by a delimiter mismatch. You exported using one separator (e.g., a comma), but Excel is expecting a different one (e.g., a semicolon, which is common in some international regions). Either re-export from DBeaver and explicitly set the "Field delimiter" in the CSV formatter settings, or use Excel's "Data -> Text to Columns" tool to split the data based on the correct delimiter.

Problem: "Dates are showing up as weird numbers like 44927."

Solution: Don't panic! That weird number is just how Excel stores dates internally (it's the number of days since January 1, 1900). To fix it, simply select the column in Excel, right-click, choose "Format Cells," and pick your desired "Date" format from the list.

Final Thoughts

Getting your data from a relational database into Excel doesn't have to be a complicated task. DBeaver provides a full suite of tools, from a quick copy-and-paste for small jobs to a highly configurable export wizard that gives you precise control over the final output, ensuring what you see in your SQL client is what you get in your spreadsheet.

While exporting data for one-off analysis is often necessary, we've found that the routine of constantly downloading CSVs and wrangling them in spreadsheets is where teams lose valuable time. We built Graphed to break this cycle. Instead of manually exporting reports, you can connect your data sources directly and ask for the insights you need in plain English. Graphed automatically builds live, interactive dashboards that are always up-to-date, so you can spend your time making decisions, not constantly re-exporting the same reports.

Related Articles