Data can be imported from MySQL into a Microsoft Excel worksheet by using the Import MySQL Data option after selecting either a table, view, or procedure to import.
The import-data operation ignores columns containing binary data (Varbinary or Blob). For details, see Known limitation for binary data.
To import MySQL data into an Excel worksheet
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 table, view, or procedure with data to import and then click Import MySQL Data. A preview window displays the selected data and provides Options and Advanced Options to be used during the import operation.
For a description of each advanced option, see Section 4.6.2, “Import — Advanced Options”.
Clickto finish the operation.
The Import Data windows provides a preview of the columns to select during the import operation. You can specify both the columns and rows to import. As the following figure shows, the preview includes a small subset of the rows for the selected table or view.
Include Column Names as Headers: Selected by default, this inserts the column names at the top of the Microsoft Excel worksheet as a "headers" row.
Limit to ___ Rows and Start with Row ___: Deselected by default, this limits the range of imported data. The
Limit tooption defaults to
1, and defines the number of rows to import. The
Start with Rowoption defaults to
1(the first row), and defines where the import begins. Each option has a maximum value of COUNT(rows) in the table.
Create a PivotTable with the imported data: Deselected by default. For usage instructions, see Section 4.6.4, “Creating PivotTables”
Add Summary Fields: Deselected by default, this option adds a summary field to each column. For additional information, see Section 4.6.3, “Adding Summary Fields”.
Choosing Columns To Import.
By default, all columns are selected and will be imported.
Specific columns may be selected (or unselected) using the
standard Microsoft Windows method of either
Mouse click to
toggle the selection of individual columns, or
Mouse click to select
a range of columns.
The background color of a column shows the status of each column. The color white means that the column has been selected, and therefore it will be imported. Conversely, a gray background means that the column will not be imported.
Right-clicking anywhere in the preview grid opens a context-menu
with either a
Select None or
All option, depending on the current status.