Using ezRETS to Import Multiple Listing Service Data into Microsoft Excel


Table of Contents

1. Introduction
2. What you'll need
3. Getting started

1. Introduction

The ezRETS ODBC driver from the Center for Realtor Technology at the National Association of REALTORS®, was designed to allow ODBC-aware software to easily query data from any Multiple Listing Service that supports the RETS standard. Many of the programs in Microsoft Office can utilize ezRETS to integrate real estate listing data directly into your own custom documents. The following is a short tutorial that demonstrates how to do this in Microsoft Excel.

2. What you'll need

For this tutorial, you'll need:

  • The latest version of the ezRETS driver, which can be obtained from the web site http://www.crt.realtors.org/projects/rets/ezrets/

  • An ezRETS data source defined in Windows' "Data Sources (ODBC)" control panel.

  • An installation of Microsoft Office that includes Excel. The images and examples in this tutorial come from Microsoft Office XP, but the same steps should work in other versions with only slight differences.

3. Getting started

To begin, create a new blank workbook in Microsoft Excel. Once it comes up, click on the "Data" menu on Excel's main menu bar, navigate to the "Import External Data" submenu, and select the "New Database Query..." menu item:

Excel will then open up the Microsoft Query application, which will present a window asking you to choose the data source you want to access. Select the ezRETS data source you wish to use from the list:

Make sure that the checkbox next to "Use the Query Wizard to create/edit queries" is checked, and click "OK".

The next window will present you with a list of tables that are available from the MLS system. Depending on the information that is available from your MLS, you may see several tables with names that start with "data:", like "data:Property:ResidentialProperty". Find the table that contains the information for the type of properties you're looking for; for this example we will choose "data:Property:ResidentialProperty", which contains information about residential property listings. To the left of the table name, you'll see a icon. Click on this icon to reveal the list of columns that exist in this table:

Select the "ListingID" column, and click the ">" button. When you do this, the column name will move over to the list on the right side of the window, to indicate that it will be included in the results of your query. Do this again for a few other fields, such as "ListingStatus", "ListDate", "Unstructured", "City", and "ListPrice" columns:

Caution

Don't select columns from more than one table! While the Query Wizard will let you do this, it isn't supported by the ezRETS driver, and will cause an error message when you click the "Next" button!

Click "Next" to move on to the "Filter Data" window, where you can define the criteria for your query:

Criteria can be defined for any of the columns that you added to the query in the previous window. For example, you could have the query look only for a specific listing number by adding a criteria for the "ListingID" field. It is highly recommended that you define some sort of criteria for an MLS query, since otherwise there's a good chance that the MLS service will refuse the query since it would return too many listings.

For this example, we're going to limit the query to look only for properties in a certain city and price range. To do this, first select the "City" column on the left. When you do this, the first drop-down menu will activate. In this dropdown, select "equals". The field to the right of the menu will then activate; in this field enter "Fishers". This will limit the query to only returning results in that city. Your screen should look like this:

Also notice that "City" on the left is now in bold print; this is to indicate that you have entered filter criteria for this column. Now select the "ListPrice" column. When you do this, the information on the right side of the screen will reset; this is because we haven't added criteria for "ListPrice" yet. (If you go click on "City" again, the criteria you entered for "City" will re-appear.) In the first drop-down menu, select "is greater than", and then enter "125000" in the field to the right. The next drop-down will then activate; in that drop-down, select "is less than", and enter "150000" in the field to the right of it. Make sure that the "And" button between the first and second dropdown is selected; this tells the MLS service that a listing must match both of these "ListPrice" criteria to be acceptable. The criteria for ListPrice should look like:

Click "Next". The next window will allow you to pick which columns of the query you'd like the results to be sorted by. Unfortunately, RETS does not support this type of functionality. You can just click next at this screen. (This graphic needs to be updated.

Click "Next". On the next window, select "Return data to Microsoft Excel", and click "Finish":

You will then be returned to Microsoft Excel. Excel will display one final window, asking you where you'd like the data to be written. You have the choice of creating a new table of data starting at an existing cell in the workbook, or to put the new data into a new sheet. For this tutorial, select "New sheet" like so, then click "OK":

Excel will add a new sheet to your workbook, and run the query. When it completes, you should have a new sheet that looks something like this:

As you can see, the results are returned in a table format, with column names in the first row, and one MLS listing in each following row. In the above example we have two separate listings, one on row 2 and one on row 3. You can now create references to this data on other sheets in the workbook using cell references and formulas like you would with any other data in Excel. In addition, if you go to the "Insert" menu, to the "Name" submenu, and select "Define...", you'll see that Excel has defined a named range corresponding to your query that you can also utilize in cell formulas such as summations. (For more information about named ranges, consult Excel's built-in Help.)

Behind the scenes, Excel actually saves the information necessary to retrieve this data again at a later date. Thus, you can easily come back later on and bring the data up to date with any new information that may have appeared in the listing service. Just go to the sheet that has the data on it, right-click on a cell within the data, and select "Refresh":

That's it! You now have an Excel spreadsheet that can retrieve live data from your Multiple Listing Service, and update that data anytime you wish.