[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1539
  • Last Modified:

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

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
plandau
Asked:
plandau
1 Solution
 
Chris BottomleyCommented:
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
 
Scott HelmersVisio Consultant, Trainer, Author, and DeveloperCommented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now