I've googled this but all the examples are on an old excel. My current excel does not have the option of MySQL on the Data tab. i tried importing through Other Source, SQL Server but it doesn't connect through Server name. I don't understand why or if i'm putting in the wrong Server name. Should it be something other than localhost?
You cannot import an excel file in MySQL Workbench. That was never possible as it would require to parse the excel file. Instead export your excel file in Excel to CSV and import that in MySQL Workbench.
Importing CSV into MySQL via MySQL Workbench is easy. Open the Table Data Import Wizard from the schema tree:
It allows you to import CSV and JSON data. Select your file on the next page, set import options too (e.g. separator and quote char) and then let it run.
You can copy paste your Excel data in the result grid of Mysql Workbench.
Simply select in your Excel sheet all the rows and columns you want to insert in your database and copy them.
Copying cells containing formulas works, but pay attention to:
After having copied the cells, right-click in Mysql Workbench on your table and choose "Select Rows" and the results of your query will appear in a result grid.
Right-click in the result grid in the empty row at the bottom and choose "Paste Row" from the menu.
Then click on "Apply" and confirm the insert queries. If everything goes well, your data will be inserted. Otherwise MySQL errors (constraint violations, etc.) are displayed. These errors can help you debugging what went wrong and where you need to correct your Excel data.
For me this works well and I didn't encounter any encoding issues yet.
However there are performance issues if you want to paste large datasets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With