MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Trying to integrate Excel data into MapPoint

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; I'm not sure if I can help with the bigger picture or not, but we have a product (RouteWriter) ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-18-2008
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 742
Re: Trying to integrate Excel data into MapPoint

I'm not sure if I can help with the bigger picture or not, but we have a product (RouteWriter) which helps with the pushpins <-> MapPoint routes side of things, rather than the Excel Import side of things.

RouteWriter writes the pushpins to Excel in route order - ie. you've created your route, and you just want the order of the pins (and the other pin data).
RouteWriter includes RouteReader which can create a route from existing pushpins, inserting the pins in a pre-defined order. The order is set using a data field (eg. a sequence number). Note that manually importing pins (as above) does not allow you to add custom data fields - you have to use one of MapPoint's wizards; but this probably academic because if you're adding the pins programmatically, you can also insert them in any order you feel like.

RouteWriter: Export Routes from Microsoft MapPoint


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 04-18-2008
noob
White Belt
 
Join Date: Apr 2008
Location: Portland, Oregon
Posts: 9
Re: Trying to integrate Excel data into MapPoint

So, you're trying to sell me a $75 license to your software that doesn't do what I want to do?

- co
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 04-18-2008
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 193
Re: Trying to integrate Excel data into MapPoint

Hi co,

I believe Richard was responding to your initial post:

"They enter the data manually into Excel, then, manually enter much of the same data into MapPoint to calculate mileage and delivery times. After that, they enter the resultant MapPoint data into Excel again. (don't get me started on their OTHER inefficiencies)"

Note that developers charge double that cost PER HOUR, eh.



Mike Mattys
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 04-21-2008
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 742
Re: Trying to integrate Excel data into MapPoint

Yes I was looking at your original post. Often it is instructive to find out what a user is really trying to do - often there is a simpler approach.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15 (permalink)  
Old 05-05-2008
noob
White Belt
 
Join Date: Apr 2008
Location: Portland, Oregon
Posts: 9
Re: Trying to integrate Excel data into MapPoint

UPDATE: OK, I've gotten this far.

I'm able to get it to calculate the total route mileage based on each individual point on the route then I'm using Excel to calculate the individual segment mileage. From there, Excel can calculate the number of hours (rounded up) for that segment. Then, inserting a start time SHOULD give me my scheduling information. What I'm missing is some process that looks for a null value in the excel spreadsheet zip code column and STOPS the process there.

Please see my totally inept attempt at showing what I mean in the code below. Note that I've rem'd those lines out. But it should tell you essentially what I want it to do. Any suggestions on how to phrase that so my computer knows what I'm talking about? I know next to nothing about vb scripting so I'm hoping someone might know.

Here's what I want it to do... sort of: If Worksheets("Sheet1").Cells(4, 1) = "" Then End Sub

Any help would be appreciated.

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)
  objRoute.Waypoints.Add objMap.FindResults(szZip1).Item(1)
  objRoute.Waypoints.Add objMap.FindResults(szZip2).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(3, 3) = objRoute.Distance
  
  'If Worksheets("Sheet1").Cells(4, 1) = "" Then End Sub
  szZip3 = Worksheets("Sheet1").Cells(4, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip3).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(4, 3) = objRoute.Distance
  
  'If Worksheets("Sheet1").Cells(5, 1) = "" Then End Sub
  szZip4 = Worksheets("Sheet1").Cells(5, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip4).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(5, 3) = objRoute.Distance
  
  'If Worksheets("Sheet1").Cells(6, 1) = "" Then End Sub
  szZip5 = Worksheets("Sheet1").Cells(6, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip5).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(6, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(7, 1) = "" Then End Sub
  szZip6 = Worksheets("Sheet1").Cells(7, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip6).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(7, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(8, 1) = "" Then End Sub
  szZip7 = Worksheets("Sheet1").Cells(8, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip7).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(8, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(9, 1) = "" Then End Sub
  szZip8 = Worksheets("Sheet1").Cells(9, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip8).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(9, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(10, 1) = "" Then End Sub
  szZip9 = Worksheets("Sheet1").Cells(10, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip9).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(10, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(11, 1) = "" Then End Sub
  szZip10 = Worksheets("Sheet1").Cells(11, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip10).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(11, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(12, 1) = "" Then End Sub
  szZip11 = Worksheets("Sheet1").Cells(12, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip11).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(12, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(13, 1) = "" Then End Sub
  szZip12 = Worksheets("Sheet1").Cells(13, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip12).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(13, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(14, 1) = "" Then End Sub
  szZip13 = Worksheets("Sheet1").Cells(14, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip13).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(14, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(15, 1) = "" Then End Sub
  szZip14 = Worksheets("Sheet1").Cells(15, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip14).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(15, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(16, 1) = "" Then End Sub
  szZip15 = Worksheets("Sheet1").Cells(16, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip15).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(16, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(17, 1) = "" Then End Sub
  szZip16 = Worksheets("Sheet1").Cells(17, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip16).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(17, 3) = objRoute.Distance

  'If Worksheets("Sheet1").Cells(18, 1) = "" Then End Sub
  szZip17 = Worksheets("Sheet1").Cells(18, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip17).Item(1)
  objRoute.Calculate
  Worksheets("Sheet1").Cells(18, 3) = objRoute.Distance

 End Sub
TIA

- co

Last edited by checkedout; 05-05-2008 at 05:57 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16 (permalink)  
Old 05-08-2008
noob
White Belt
 
Join Date: Apr 2008
Location: Portland, Oregon
Posts: 9
Re: Trying to integrate Excel data into MapPoint

VICTORY!

Using a loop, it works! Yay!
Thanks to all who helped out.

Posting the code here for your edification:
Code:
Private Sub CommandButton1_Click()
Dim Row As Integer

  Set oApp = CreateObject("MapPoint.Application.NA.13")
  oApp.Visible = True
  Set objMap = oApp.NewMap
  Set objRoute = objMap.ActiveRoute
  
  szZip1 = Worksheets("Sheet1").Cells(2, 1)
  objRoute.Waypoints.Add objMap.FindResults(szZip1).Item(1)
  
  Row = 2
  While Worksheets("Sheet1").Cells(Row, 1) <> ""
    szZip = Worksheets("Sheet1").Cells(Row, 1)
    objRoute.Waypoints.Add objMap.FindResults(szZip).Item(1)
    objRoute.Calculate
    Worksheets("Sheet1").Cells(Row, 3) = objRoute.Distance
    Row = Row + 1
  Wend

 End Sub
- co
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/trying-integrate-excel-data-into-mappoint-7511.html

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 09:00 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

Catered Chalet Ski Holidays
Looking for catered chalet ski holidays? Your search is over! Here at Holiday Hypermarket you can choose your style of accommodation with ease.

Flights to Spain
Find and book flights to Spain. Travel Counsellors can help with travel to Spain including flights and accommodation.

Cape Town Cheap Flights
Thinking about visiting Cape Town. Cheap flights are hard to find unless you visit dealchecker.co.uk. We'll shop around so you don't have to.

Holidays to Cancun
The Holiday Place has special offers on holidays to Cancun during the month of September. Book a late summer holiday with us!

Morocco
Gain insight on your holiday destination with the ULookUBook travel guides. Find out about Morocco and its customs online. Make an informed decision when you make a booking.

Price comparison sites
Travel.co.uk is the one you are looking for when checking out price comparison sites.

Cheap Lanzarote Holidays
The Canary Islands beckons you to come! View information on cheap Lanzarote holidays at On The Beach!


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47