Import data from a database

To import data from a database, such as Microsoft SQL Server, you must have an ODBC driver that is compatible with Microsoft Query installed on your computer. Compatible ODBC drivers are available from third-party vendors. For more information, see ODBC drivers that are compatible with Excel for Mac. For more information about installing ODBC drivers, see Microsoft Query Help.

  1. On the Data menu, point to Get External Data, and then click New Database Query.

  2. Use Microsoft Query to connect to a data source and to create a query. When you have finished, click Return Data to import the data into Excel.

    For more information about connecting to a data source and using Microsoft Query, see Microsoft Query Help.

  3. In the Returning External Data to Microsoft Excel dialog box, do any of the following:


Do this

Choose query definition, refresh control, and data layout options

Click Properties.

Change the settings for a parameter query

Click Parameters.

Return the external data to the active sheet

Click Existing sheet. On your sheet, click the cell where you want to place the upper-left corner of the external data range, and then click OK.

Return the external data to a new sheet

Click New sheet, and then click OK.

Excel adds a new sheet to your workbook, and automatically pastes the external data range at the upper-left corner of the new sheet.

Create a PivotTable report by using the external data

Click PivotTable, and then click OK.


  • Excel 2011 for Mac cannot import data from OLE DB or OLAP data sources.

  • By default, Excel for Mac uses tables to import data. To turn off tables when importing data, in the Returning External Data to Microsoft Excel dialog box, click Properties, and then clear the Use Table check box.

  • If the external data source you want to access is not on your local computer, you might need to contact the administrator of the database for a password, user permission, or other connection information.

See also

Import data from FileMaker Pro

Import data from a CSV, HTML, or text file

Del Facebook Facebook Twitter Twitter Mail Mail

Var disse oplysninger nyttige?

Fantastisk! Har du mere feedback?

Hvordan kan vi forbedre det?

Tak for din feedback!