Show All
Save a query
Save a query when you want to preserve formatting or want to use the same query later or in a different workbook. For information about opening query files in Microsoft Excel, see Help in Excel. You don't have to save a query to return data to Excel.
- Click Save File
.
- In the File name box, type the name you want.
- In the Save as type list, Microsoft Query automatically selects Query Files (*.dqy). If you want to use the query in a version of Query earlier than Microsoft Query 97, click Query Files (*.qry).
A parameter query can be saved only in *.dqy format and can't be used in a version of Query earlier than Microsoft Query 97.
- In the Save in list, click the folder where you want to store the query.
- Click Save.
Notes
- When you save a query file, Query does not save the current result set displayed in the Data pane. The result set is automatically refreshed, before the Save As dialog box is displayed, even when the Auto Query
button is not pressed in.
- If you want to prevent Query from running the query before you save the query or return the data to Excel, click Options on the Edit menu, and then clear the Validate queries before saving or returning data check box.
- The default location for query files is your user profile folder in Application Data\Microsoft\Queries. When you save a query in this location, its file name appears on the Queries tab when you open a new query in Microsoft Query or when you use the Run Saved Query command (Data menu, Get External Data submenu) in Excel.