Solved

Fill the data in excel to the visio from the template that i have.

Posted on 2008-10-28
13
852 Views
Last Modified: 2012-06-27
hi,

Fill the data in excel to the visio from the template that i have.
Its a related Q from the Scott's solution
Pull data from Excel to visio and save thenm to html pages.

Regards
Sharath
0
Comment
Question by:bsharath
  • 8
  • 5
13 Comments
 
LVL 30

Expert Comment

by:Scott Helmers
Comment Utility
Sharath,

It will be a few days, but I'll let you know when I have something to look at. In the meantime, I'll need two things from you:

1) A template with fields boxes arranged as you want them (there's no hurry -- I can test with the default layout generated by my macro).

2) A spreadsheet that contains 5-10 rows of data. Please change names, employee numbers and any other personally identifiable data before uploading.

Scott
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility
Ok Scott i shall prepare them and post in a couple of days... :-)
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility
Scott one Q... Can i have the page size bigger that A4?
As the fields to arrange is very difficult with the available space...
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility
Please omit the above comments. I reduces the colums to make it perfect on what is required to to that.

Attached is the vsd that has the details.
Can you please make it look good when a print is taken with the lines straigh all size to match each other.
All in a line to match the grid lines.

Hope they resize as per the data in the cells so names or email addresses differ as they may be big. In such cases adjust accordingly.


Template.txt
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility
Scott i want the html to be names as the NTlogin. So can use them to be mailed.

Html file names as the colum that has the Ntlogin.
0
 
LVL 30

Expert Comment

by:Scott Helmers
Comment Utility
Very busy next couple of weeks but I will get back to this....

Regarding making the template look neat, I'll leave that up to you, largely because I don't know how you would like things aligned. You can use Visio's align function to ensure that everything is perfectly straight. Just select a group of shapes, the choose Shapes/Align from the main Visio menu. It will probably take some experimentation to get exactly what you want (undo is extremely use if you align things in a way that doesn't look good), but you can make things line up any way that you'd like. The new macro I'll provide  will fill in the text boxes on any template built from the first macro, so you'll always be able to move things around in the template and then run the "fill-in-the-blanks" macro again.

Re lining the arrows up with the boxes: If an arrow has come unglued from the shapes at either end, just select the arrow and you'll see either one or two green squares at the ends; green means that end is not glued; red means it is glued. For any that aren't glued, just drag the green square into the center of a rectangle and when the rectangle has a red outline, let go of the mouse -- now the end of the line will be red and it will be glued to the exact center of the rectangle.

You are correct that the text boxes will resize to accommodate the text. After we look at some pages created from the test data you send, you may need to move things around a bit, but we won't know that until we see you data on the pages.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 11

Author Comment

by:bsharath
Comment Utility
Ok Scott thanks
0
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
Comment Utility
The attached code doesn't create the html pages yet but it does create a Visio page for each row of Excel data using the template you provided.

Please let me know whether you would like any formatting changes: bold vs regular text, font size, size of text boxes, etc.

You never sent a workbook with additional sample data as I had requested above so I've just tested this with the workbook containing one row of data that you provided in the previous question. BTW, the code assumes the NTLogon is in column L and it processes spreadsheet rows until it encounters the first blank NTLogon.
Write-Excel-data-to-shapes-v1.txt
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility
Scott thank U

When i run the macro it asked me for the xls when selected it created the sheets with the NTlogins but no data got filled
0
 
LVL 30

Expert Comment

by:Scott Helmers
Comment Utility
It does work with the sample data that you sent in a previous question (I'be attached it here). It should work with any file that has exactly the same column names -- that how the data is matched to empty text boxes.
Excel-Sample1.xls
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility

Thank U Scott worked perfect...
Just realized that my data is in row 2 and has few more colums at the end newly added and a spell mistake in one of the headers
After changing all the 3 i got it working

I want the Size of the Data to be 1 size smaller that the headers at present its too small.

Posting a new Q for the Saveas Html now...

Will the macro not work if the header data is changed?
If i add some more colums at the end of the last colum will it now work.

0
 
LVL 30

Expert Comment

by:Scott Helmers
Comment Utility
The macro will work with additional columns of data. It's written so that it reads across the header row until it reaches the last used column. However, if you've added columns since you created the template, you'll need to rerun the first macro to create title and text box shapes for the new columns.

Re font sizes: the title boxes have 8 pt text and the data boxes are 4 pt. Would you like the data boxes to be 7 pt or 6pt?
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility
Data boxes to 7 would be fine...
I have added the new colum in excel but will not need them in Visio. So you can go ahead with the next step on saveas
THX
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A recent Visio zone question asked how to use the data in an Excel file to create a Visio Gantt chart -- and then to dynamically update the Gantt chart. The good news is that the Viso Gantt Chart wizard can be automated. The bad news is that the…
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine containers. We’ll explore lists (http://www.experts-exchange.com/Microsoft/Applications/M…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now