Community of VE/MapPoint Users and Developers
This is a discussion on Trying to integrate Excel data into MapPoint within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; OK... I'm new to the whole data integration thing when it comes to MapPoint and Excel. I work for ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Trying to integrate Excel data into MapPoint What I would like to do is create a macro that does much of this automatically. OR, at the very least, exports Excel data to MapPoint in one step. Then, the data could be evaluated from there. What requirements does MapPoint have for the dataset? Can I get away with just importing zip codes and having MapPoint create mileage info from there? That would be ideal. Essentially, where do I start? ![]() Any helpful input would be appreciated. - co |
| |||
| Re: Trying to integrate Excel data into MapPoint
OK... I've manually accomplished the following. Hopefully someone will see what I'm doing and help provide a push in the right direction. Using Zip Codes from a modified version of our load planner spreadsheet, I was able to use the Data import wizard to import push-pins that seem to show the appropriate locations. That data is sufficient for planning mileage and route information. I'm still trying to figure out how to plan a route using pushpins though. The search continues. I have questions though: How do you tell MapPoint to look at a specific subset of the data to import? ie: a specific cell range containing a list of zip codes that are already in the appropriate order. Any thoughts? I know the MapForums hive mind already has some genius who has figured all this out, so I'm sharing my progress here in hopes that that person will have some good input. TIA, again. |
| ||||
| Re: Trying to integrate Excel data into MapPoint
Have you seen the Excel / MapPoint examples at Working With Excel and MapPoint - MP2K Magazine ? Also, the Help file programming examples are awesome. If / when you get stuck after that, please post your code and/or attach your spreadsheet, from there I think we can jump in more easily to help. Eric
__________________ Order MapPoint 2006 | Read Programming MapPoint in .NET | Start Using the Pushpin Tool - Free Trial Download - click here. |
| |||
| Re: Trying to integrate Excel data into MapPoint Quote:
Thanks again! - co |
| |||
| Re: Trying to integrate Excel data into MapPoint
OK... awesome... I've gone through the first two tutorials. Those helped a great deal. I'm working on incorporating the info I've gleaned on those into the current project. I think I'm getting the hang of the starting point on this at least. I need to have this process work where only the zip codes (10 to 15 of them) on an individual load are entered into MapPoint. Then, MapPoint would create a route in the order of the zip codes and output mileage information that goes back into Excel. But this is a significant first step... I can see that your code identifies specific cell references using a coordinate system: Code: Worksheets("Sheet1").Cells(2, 2), _
Worksheets("Sheet1").Cells(2, 3), , _
Worksheets("Sheet1").Cells(2, 4), _
Worksheets("Sheet1").Cells(2, 5))(1) Also, when I take out the first line "Worksheets("Sheet1").Cells(2, 2), _" it goes all weird. Evidently, it can't identify the location using JUST the City, State and Zip information. That's a bummer. - co EDIT: OK, I'm an idiot. I see you have a solution for part of my whining. I'll read further before venting more of my spleen. Last edited by checkedout; 04-17-2008 at 05:18 PM. |
| ||||
| Re: Trying to integrate Excel data into MapPoint
Looking forward to your next vent, maybe we can aid you along... or not . but don't hesitate to post details anyway.. someone else searching could also learn from your journey.Eric
__________________ Order MapPoint 2006 | Read Programming MapPoint in .NET | Start Using the Pushpin Tool - Free Trial Download - click here. |
| |||
| Re: Trying to integrate Excel data into MapPoint
Eric, you ARE a rock-star. I've done some minor modification on this code to deal with multiple zip codes. Here's what I have so far. Code: Private Sub CommandButton1_Click()
Set oApp = CreateObject("MapPoint.Application.NA.13")
oApp.Visible = True
Set objMap = oApp.NewMap
Set objRoute = objMap.ActiveRoute
szZip1 = Worksheets("Sheet1").Cells(2, 1)
szZip2 = Worksheets("Sheet1").Cells(3, 1)
szZip3 = Worksheets("Sheet1").Cells(4, 1)
szZip4 = Worksheets("Sheet1").Cells(5, 1)
szZip5 = Worksheets("Sheet1").Cells(6, 1)
szZip6 = Worksheets("Sheet1").Cells(7, 1)
szZip7 = Worksheets("Sheet1").Cells(8, 1)
szZip8 = Worksheets("Sheet1").Cells(9, 1)
szZip9 = Worksheets("Sheet1").Cells(10, 1)
szZip10 = Worksheets("Sheet1").Cells(11, 1)
szZip11 = Worksheets("Sheet1").Cells(12, 1)
szZip12 = Worksheets("Sheet1").Cells(13, 1)
szZip13 = Worksheets("Sheet1").Cells(14, 1)
'Add route stops and calculate the route
objRoute.Waypoints.Add objMap.FindResults(szZip1).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip2).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip3).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip4).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip5).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip6).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip7).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip8).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip9).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip10).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip11).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip12).Item(1)
objRoute.Waypoints.Add objMap.FindResults(szZip13).Item(1)
objRoute.Calculate
Worksheets("Sheet1").Cells(2, 3) = objRoute.Distance
End Sub But if I can come up with a better way to define that column based on them being populated or NOT populated, THEN run a variation of that expression from there. .... PROFIT! - co |
| ||||
| Re: Trying to integrate Excel data into MapPoint
I don't think so, but Thanks! ![]() Can you post a sample spreadsheet as an attachment? You might have to zip it first.. Eric
__________________ Order MapPoint 2006 | Read Programming MapPoint in .NET | Start Using the Pushpin Tool - Free Trial Download - click here. |
| |||
| Re: Trying to integrate Excel data into MapPoint
OK... here's a rough example of the sheet the boss-man uses. http://checkedout.org/MapPointForum/SampleSheet.xls The data I would like to automatically fill is the light blue fields in J6:J19 Hopefully this gives you an idea of what I'm dealing with. - co |
![]() |
| ||||
| Posted By | For | Type | Date | |
| MAPPOINT DOWNLOADS: License Agreement - MP2K Magazine | This thread | Refback | 04-21-2008 06:33 PM | |
| MapPoint Help - MP2K Magazine | This thread | Refback | 04-18-2008 03:49 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problems exporting MapPoint data to Excel in embedded map | o0beaner | MapPoint 2006/2009 Discussion | 4 | 03-12-2007 02:14 PM |
| How do I Integrate MapPoint with MSAccess | newlifcc | MapPoint 2006/2009 Discussion | 1 | 09-21-2005 12:22 PM |
| Linking Data within an Excel Workbook to Mappoint | XLR Excel | MapPoint 2006/2009 Discussion | 0 | 07-06-2005 01:23 PM |
| Error on import data from Excel to mapPoint | Anonymous | MapPoint 2006/2009 Discussion | 5 | 01-27-2005 03:06 PM |
| importing data from excel to mappoint | Layne | MapPoint 2006/2009 Discussion | 0 | 05-09-2003 12:40 PM |
Exeter Flights
Visit Holiday Hypermarket online to find all the essential information about Exeter Airport and Exeter flights. Booking is quick, easy and cheap with Holiday Hypermarket.
Best Travel Agent
Book your Travel with the UK's best Travel Agent - as named at the Guardian Unlimited Travel awards.
Portugal Holiday
For such a small country, you have many options from which to choose. A Portugal Holiday can include fantastic beaches and stunning scenery. Check out our great deals.
Holidays to Cuba
For the best offers on holidays to Cuba, visit The Holiday Place today. Find a deal to suit you and your budget online!
Cheap Egypt Holidays
Pick up a bargain cheap Egypt holiday online when you visit ulookubook.com. Just check out our tips to make sure you book at the right time to get a great holiday for a great price. Finding cheap Egypt holidays can be simple when you know how.
Compare Holidays
Compare holidays online where you can see all the amazing possibilities at Travel.co.uk
Cheap Holidays to Lanzarote
Visit the Canary Islands, even if you're cash strapped! View cheap holidays to Lanzarote at On The Beach!