I often use the Microsoft supplied OrgData.xls sample file to demonstrate linking to external data in Visio, however there are a few gotchas lying in wait for the unwary if you try to link to the Microsoft supplied Org Chart shapes …
In the following screenshot, I have the OrgData table showing in the External Data window and I have the ShapeSheet open for the selected Executive Belt shape. Notice that the Shape Data section rows are all black which indicates that they are inherited from the master shape. Also note that there is a Shape Data row with the label “E-Mail” in the ShapeSheet, and one called “E-mail” in the Personnel table.
The difference in case is sufficient for the Link Data to Shapes feature ignore the Shape Data row labelled “E-Mail”, and create a new one labelled “E-mail”.
In addition, if you use the Column Settings dialog to edit the case of the letter M in “E-mail” by using Rename, then Visio ignores the change because merely altering the case of a letter is not considered a significant enough edit to bother saving! Therefore, you need to make a significant change first, and in my case I removed the hyphen too then clicked OK, and then re-edited the column name to “E-Mail” before clicking OK again.
Now, because I have a perfect case-sensitive match, I now get the data automatically entered into the original “E-Mail” Shape Data row.
Notice, in the above screenshot, that all of the Shape Data section is now blue because it indicates that Visio has made the whole section local to this shape instance. If I wanted to go the whole hog, then I could edit the Executive Belt master shape in the document stencil to have all of the necessary Shape Data rows, and could even use terser row names than those automatically created by the Link Data to Shapes feature. Then all of the rows would still be inherited, but the values, of course, are local.
This would be the most efficient method, but in the case of the Org Chart template, there is an extra caveat … there are many identical masters with different names, so they would all need to be edited. That is best done in code.
I have to reate an organization chart and list all the members by Name in Shape.
The shape should consist of one shape with the name of the unit and the name of the boss the unit and with connected a rectangle below with all members. Therecancle has a black border and shoud scale the members.
To do the shape of the unit with boss is no Problem but how can I fill the shape with the members and scale it.
The Chart should be updateable with vba and the result should look like this =>
I have all the data in CSV oder XLS.
Would be great if you could give me some hints !
I trust that my new book contains the answer to this?
Dennis Cumbie says
We recently spoke about this topic, and I greatly appreciate your assistance! It may be obvious, but one may achieve the same outcome conversely if they first edit the column name in the excel *file before initiating the link. Just as your post states, Visio will not add a property row if an existing ShapeData.Label exactly matches DataColumn.ColumnName. And to be clear, it must be the ‘Label’ property that matches, not the ‘Name’ property.
*C:\Program Files\Microsoft Office\root\Office16\Visio Content\1033\ORGDATA.XLS
PS Thanks for teaching me why some shapesheet text is blue and some is black!