Visio Shape to Excel database not automatically synchronising.

Started by denismq, October 19, 2009, 03:35:23 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

denismq

I am trying to create a two way link between Visio 2003 and Excel 2003

I successfully link Visio shapes to an Excel spreadsheet but have to manually (right click shape) "select database record" to synchronise each data field to each Visio shape.

I expected the procedure shown would synchronise the Shape.Key field on the shapes with the Shape.Key excel field but it doesn't.
I can do this manually but I have hundreds of these to do.

Can I please get advice on what I need to do?
Imagine you had a few hundred shapes to link to the same number of records.

Visio 2003
Windows XP

1/   Create Excel Spreadsheet called Test.xls
   Close spreadsheet
2/   Create 3 x Visio Shapes (circles)
3/   Number shapes 001 to 003
5/   Tools – Add-Ons – Visio Extras – Database Export Wizard
   Export data to Test.xls
             Select
All shapes on page
             Select LineColor & Shape.Text as "Cells and Fields to export"
   Select Excel Files as "ODBC data source to export to."
   Select Test.xls as the file to export to
   Type "Fred" as the table name and accept defaults
   The file successfully exports
   This creates a table in text.xls called Fred (cells A1 to C4)
   The columns are ShapeKey, LineColor and ShapeText
6/   Close spreadsheet test.xls
7/   Tools – Add-Ons – Visio Extras – Database Wizard
   
Select:    Link shapes to database records
       Shapes in a drawing
       Pick all shapes on drawing
       Chose Excel Files as data source
       Select Test.xls
       Database Table "Fred" (shows as the default)
       Shapekey as the primary key
       None as the default value
       Link Database Field LineColor to Cell LineColor
       Link Database Field ShapeText to Cell Shape.Text
Finish

aledlund

 :-\ As far as I can remember, you are correct. It is not automatic. After creation of the database you either use the menu to refresh, or write some fairly simple code. The database wizard is not interactive but batch...
al

miless2111s

Sorry to drag up an old post - having just done this for a significant number of items on a page I found it useful to put all the items you want to update on the same layer.  They can then all be updated at the same time by selecting everything on the layer and updating them in one go.

Hope this helps someone... :)

Miles