Documentation Home
MySQL and Windows
Related Documentation Download this Excerpt

MySQL and Windows  /  Export Excel Data into MySQL

Chapter 11 Export Excel Data into MySQL

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 6.2, “New Schema Creation in Excel”.

To export Excel worksheet data to a MySQL table

  1. Start Excel, select the Data menu tab, and then click MySQL for Excel to open the MySQL for Excel task pane.

  2. 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.

  3. Select a schema from the list and click Next to display all database objects in the schema (tables, views, and procedures).

  4. 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.

  5. In the Export Data to MySQL dialog, do the following:

    1. 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).

    2. Type a unique table name and select the collation to use for the new table.

    3. Choose or create a primary key column for the new table.

    4. Select each column and apply the appropriate options and option values.

    5. Click Export Data to create the new table with data.

Figure 11.1 Exporting Excel data to MySQL

Exporting Excel data to MySQL


User Comments
Sign Up Login You must be logged in to post a comment.