# Create views by using excel spreadsheets

**URL:** <https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133>\
**Category:** Packages\
**Created:** [September 10, 2015, 5:28am UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133 "2015-09-10T05:28:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swapnil\_Raut](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Swapnil\_Raut](https://forum.dynamobim.com/u/Swapnil_Raut)\
**Post date:** [September 10, 2015, 5:28am UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/1 "2015-09-10T05:28:44Z")

</div>

Is this possible to create views by using excel spreadsheets .

---

<div class="post-metadata">

**Author:** ![Ben\_Osborne](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_osborne/32/17366_2.png) [@Ben\_Osborne](https://forum.dynamobim.com/u/Ben_Osborne)\
**Post date:** [September 10, 2015, 6:35am UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/2 "2015-09-10T06:35:21Z")

</div>

Yes it is possible. The big question is what type of view do you want to create, and what info will be in the spreadsheet.

For Instance:

Assume you want to create a bunch of floor plans from a spreadsheet. The spreadsheet might have two columns - one for the view name and one for the associated level name. You would first create a Dynamo Script to read these two lists of strings in from the spreadsheet. Next, you would have to add to the script a section that takes the Level names and finds the associated Revit level elements (Archi-Lab package has a node called “Get Level By Name” that will do this for you). Now that you have a list of level elements, feed that into the “FloorPlanView.ByLevel” node to create all of the floor plan views. This will output the view elements that are created. Next, feed that list of created views into a “SetParameterByName” node, feed in a string “View Name” as the parameter to be set, and feed in the list of view name strings taken from excel as the parameter values. This will rename all of the views you just created to the values set in Excel. Note that you will need to ensure that none of the View name values in excel are identical as this will throw an exception. If you do want some views to have the same names on sheets, then you can set the parameter “Title on Sheet” instead.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Swapnil\_Raut](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Swapnil\_Raut](https://forum.dynamobim.com/u/Swapnil_Raut)\
**Post date:** [September 11, 2015, 5:44am UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/3 "2015-09-11T05:44:00Z")

</div>

Hello,  
I am a newbie in dynamo. I am following steps as per description given by Ben.  
I get following messege while run the script.

![view](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/8/8c01c54659b357baefe09a1e4ab3064bab9e5b90.png)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [September 11, 2015, 6:34am UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/4 "2015-09-11T06:34:34Z")

</div>

Swapnil, You have not connected any elements to the _Element.SetParameterByName_ node

I’m not sure about this, but, The _Get Level By Name_ node probably needs those levels to be present in the project and they probably aren’t.

However, your intent isn’t clear to me. What exactly are you trying to achieve?

If you just need to rename levels, then try something like this…

![20150911-3](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/6/638694689d7fbdf49d67604af46b463c878a408e.jpg)

---

<div class="post-metadata">

**Author:** ![Ben\_Osborne](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_osborne/32/17366_2.png) [@Ben\_Osborne](https://forum.dynamobim.com/u/Ben_Osborne)\
**Post date:** [September 11, 2015, 7:29am UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/5 "2015-09-11T07:29:59Z")

</div>

Sorry Swapnil-

The Get Levels by name node does not work on Lists. It only works on a single string to produce a single level. If you want to use it on a list of level names, you need to feed it through a list.map node. See attached. This will work to do what you want.

![create views](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/5/573b26e4df5f864ae132dd104578fa55233b0b07.png)

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![cadman6735](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@cadman6735](https://forum.dynamobim.com/u/cadman6735)\
**Post date:** [June 28, 2017, 5:43pm UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/6 "2017-06-28T17:43:20Z")

</div>

Hi Ben  
I would like to view your image but I am unable to enlarge the file.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [June 28, 2017, 5:47pm UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/7 "2017-06-28T17:47:37Z")

</div>

@cadman6735 Here is the clear image. ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/3/33c1576835816c17f85b020fd0f60d8fc396d846.png)

---

<div class="post-metadata">

**Author:** ![cadman6735](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@cadman6735](https://forum.dynamobim.com/u/cadman6735)\
**Post date:** [July 11, 2017, 4:51pm UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/8 "2017-07-11T16:51:41Z")

</div>

Thank you very much

---

<div class="post-metadata">

**Author:** ![msotherden](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/msotherden/32/44289_2.png) [@msotherden](https://forum.dynamobim.com/u/msotherden)\
**Post date:** [January 21, 2019, 8:55pm UTC](https://forum.dynamobim.com/t/create-views-by-using-excel-spreadsheets/2133/9 "2019-01-21T20:55:52Z")

</div>

Hi everyone - I have been looking for something exactly like this, but I have had no luck with it running.

We are looking to create views based on copied/monitored levels and to change the View Name based on an excel file that looks similar to the following. Column A is the Level in Revit, Column B is the View Name and Colums C is the Template that I would like to associated with each respective level. The levels already exist, as do the Templates in the Revit file.

![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/a/0a62f7d88051d2b5a3a69a5ca1f25b90057335e4.jpeg)

Any help is really appreciated. As of right now I seem to get stuck on the Element.SetParameterByName. Also, I stripped down the code to just try and get Views setup.

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/f/efb6334ffa7cddc0cb32a4341dd2b385060b15ff.jpeg)
