Data from a Microsoft Excel worksheet can be exported to a new MySQL database table within an existing schema. For instructions on how to add a new schema from MySQL for Excel, see Section 4.3.2, “New Schema Creation in Excel”.
The export-data operation ignores columns containing binary data (Varbinary or Blob). For details, see Known limitation for binary data.
To export Excel worksheet data to a MySQL table
Start Excel, select themenu tab, and then click to open the MySQL for Excel task pane.
From the Open a MySQL Connection area in the task pane, double-click an existing local or remote connection to display the available database schemas.
Select a schema from the list and clickto display all database objects in the schema (tables, views, and procedures).
Select the cells in the Excel worksheet to export and then click Export Excel Data to New Table. A preview window displays the selected data and provides Column Options and Advanced Options to be used during the export operation.
In the Export Data to MySQL dialog (see the next figure), do the following:
Specify whether the first row in the preview should be used as the column name. This option is selected by default.
The First Row Contains Column Names check box controls the data type for columns either by defaulting the type to a suitable one for rows 2-n (if checked) or to one suitable for rows 1-n (if unchecked).
Type a unique table name and select the collation to use for the new table.
Choose or create a primary key column for the new table.
Select each column and apply the appropriate options and option values.
Clickto create the new table with data.