Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I populate fields in a visio diagram from an Excel worksheet?

Posted on 2008-06-13
2
1,428 Views
Last Modified: 2012-08-14
I have created a printable Visio diagram that has a variety of text boxes scattered throughout that contain numbers. These numbers change over time, and I need to subsequently change the Visio diagram accordingly. However, I was wondering if there was a way to connect the values from certain fields in an Excel spreasheet to what is displayed on the Visio diagram, as the Excel spreadsheet is where these values are being changed. If I can do this, I merely change the spreadsheet, and then I can print an updated Visio diagram that reflects those changes.
Any ideas on how to do this?
0
Comment
Question by:plandau
2 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 125 total points
ID: 21791714
To set or establish the name of a text box:

Right click : format : special.

Modify the box names in column 1 to reflect your own box names and the box text dtrings in column D to reflect the new text to be used ... use a copy of your visio file as a test sequence.

Chris


    For shapeCount = 1 To ThisWorkbook.Sheets(1).Range("A" & ActiveSheet.Rows.Count).End(xlUp).Row
'        visdoc.Pages(1).Shapes(ThisWorkbook.Sheets(1).Range("A" & shapeCount).Text).SetCenter ThisWorkbook.Sheets(1).Range("B" & shapeCount).Value, ThisWorkbook.Sheets(1).Range("C" & shapeCount).Value
        visdoc.Pages(1).Shapes(ThisWorkbook.Sheets(1).Range("A" & shapeCount).Text).Text = ThisWorkbook.Sheets(1).Range("D" & shapeCount).Text
    Next

Open in new window

deleteme1.xls
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 21794741
If you'd like an alternative that doesn't require programming, Visio 2007 Professional allows you to link shapes on a page to data in Excel quite easily. And once you've established the link, you can update the drawing manually or at a preset time interval.

Microsoft calls the feature "data linking" and includes some useful content on their web site:

-- demo: http://office.microsoft.com/en-us/visio/CH100740891033.aspx (see first demo)

-- tutorial: http://office.microsoft.com/en-us/training/CR101109221033.aspx (four tutorials on linking)
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically someone asks me whether there’s a way to automatically convert all of the pages in a Visio drawing to PowerPoint slides. There have even been a few times when I’ve wanted to do that myself but I never really had enough incentive to figu…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question