I have a MapPoint console application that imports a .csv file containing lat/long fields and a count field. The data is mapped using a ShadedArea map to sum the count field by ZipCode (PostalCode1?).

Once the data is imported, I loop through a list of locations from an XML file. A new location is created using a lat/long as the center point and an altitude. Once the location is displayed (DisplayDataMap) I save the resulting map as a .gif image using the SavedWebPages.Add method with a pre-defined height and width.

So basically I am importing in Lat/Long and outputting a summary by ZipCode in a DiscreteRange ShadedArea map. Pretty simple so far.

Now i need to export ONLY the data for each particular location into a separate file to associate the respective data back to the map. For example, ZipCodes 66000 - 66500 are in the first location. I want to export only the data for that particular location summed by zip code the way it displays in the map.

If I take one of these locations and use the MapPoint UI, select the entire area, then select the "Data", "Export to Excel" menu option, it gives me exactly what i want. However, when using the QueryShape method, the MapPoint Recordset contains the data in the same format as it was imported from the original file.

How do i export the data from code the same way MapPoint exports it using the file menu in the UI?