Import Excel to MySQL, Create Tables Easily with One Click! This SQL Editor is All You Need
Published: 2024-06-13 02:51:18

**Required Tool**
**SQLynx Pro ** (latest version 3.3.0 as of now)
Steps
SQLynx supports two modes for importing Excel files: when the database has pre-created tables, or when tables need to be created. This guide introduces the process of importing data and creating tables directly when there are no pre-existing tables:
**Step 1**
Open the left navigation tree, find the database where you want to import data, right-click on "Tables" under the object menu, and select "Import to Generate Table" from the menu that appears.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dxt37o9ieta0dg0947f.png)

**Step 2**
You can choose to import CSV or Excel formats. Here, we will demonstrate using Excel:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9q2ds5lwvz3r9hjmgc6.png)

Here, we select the prepared local Excel file to upload. Choose the encoding based on your actual development needs:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtlj2unox73aatem47pq.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixcidtfi1aul2o1vny9h.png)

Next, you will see the table mapping. On this page, you can modify the name of the imported table, compare source fields with target fields, and adjust field types as needed. For example, I have modified some field types based on actual requirements:

Next, you can see a preview of the table data:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v8bqvkb3mh7wal2m4qby.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i052f6is1qh8ekjks97a.png)
The final step is selecting the import mode. The default setting is to stop on failure, but you can also choose to continue on failure or execute in transactions. When executing in transactions, you can select the batch size for processing the data:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xeu5tmpbqz5kr2g6uok5.png)
**Step 3**
After executing, check the left navigation pane. If the import is successful, a new table will appear at the target location:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4mxzi4hce8fscl0rjjn.png)
We can right-click on this table and select "View Table Details" to see the detailed table structure. Here, we can further edit the fields, such as creating a primary key, adding comments, and more:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdjamr5juyshf00z58yx.png)
Clicking on the "Data" tab allows you to switch to the page displaying table data. Here, you can see that the data from Excel has been successfully imported into this table.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tdqjz6zlkqrb8517wcu.png)
*Note: The names and other information used in the screenshots are randomly generated virtual data.
Finally, In addition to its user-friendly data import and table creation features, SQLynx excels in handling large-scale data queries, exports, and migrations.
**How to get it? **
http://www.sqlynx.com/en/#/home/probation/SQLynx