<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ExcelRange input for Expressions?</title><link>https://communities.bentley.com/products/products_generativecomponents/f/generativecomponents---forum/188456/excelrange-input-for-expressions</link><description>Hi, 
 Is it possible to add an Excel range for example one of the Yellow fields to an Expression, I can&amp;#39;t get it work properly see image and I&amp;#39;m sure I use the right table etc.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: ExcelRange input for Expressions?</title><link>https://communities.bentley.com/thread/557432?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 05:59:43 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:df783883-4324-4f35-9011-a300221a6e3e</guid><dc:creator>Christiaan Post</dc:creator><description>&lt;p&gt;Hi Wayne,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks now it&amp;#39;s working, it Seems I had the wrong value I needed only this one &amp;quot;excelRange1.Value&amp;quot;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;//Christiaan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ExcelRange input for Expressions?</title><link>https://communities.bentley.com/thread/557129?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 21:56:55 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7988fb33-d68a-4ff4-b144-d922f21c613c</guid><dc:creator>Wayne Dickerson</dc:creator><description>&lt;p&gt;Hi Christiaan,&lt;/p&gt;
&lt;p&gt;I have attached an excel file and a dgn with the example.&lt;/p&gt;
&lt;p&gt;You may have to re-link the excel. I had is located in C:\Temp folder.&lt;/p&gt;
&lt;p&gt;The file has 2 examples, first(in blue) just a single series taken from the values in excel.&lt;/p&gt;
&lt;p&gt;The second (in orange) uses a series function but has a slider so you can select different rows in excel. Starting from 0(Row 1 in the example excel) up to 9.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/360/excel_2D00_series.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope that helps&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Wayne&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/360/Series.xlsx"&gt;communities.bentley.com/.../Series.xlsx&lt;/a&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/360/Excel_2D00_Series.dgn"&gt;communities.bentley.com/.../Excel_2D00_Series.dgn&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ExcelRange input for Expressions?</title><link>https://communities.bentley.com/thread/557041?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 08:00:08 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8297f222-4925-442d-a22a-dc43dce9c747</guid><dc:creator>Christiaan Post</dc:creator><description>&lt;p&gt;Hi Wayne,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it&amp;#39;s possible to give me an example file&amp;nbsp;this will be helpful for me.&lt;/p&gt;
&lt;p&gt;//Christiaan&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;christiaan.postATSweco.nl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ExcelRange input for Expressions?</title><link>https://communities.bentley.com/thread/557029?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 06:30:32 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c050807b-cbd6-4abf-bbd6-398304cacbeb</guid><dc:creator>Wayne Dickerson</dc:creator><description>&lt;p&gt;Hi Christiaan,&lt;/p&gt;
&lt;p&gt;I think the error is in the way you are trying to target the data from excel.&lt;/p&gt;
&lt;p&gt;I notice you don&amp;#39;t have anything in the excelRange2 RangeAddress.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;maybe this should be &amp;quot;A3:C3&amp;quot;&lt;/p&gt;
&lt;p&gt;Then you could update the Series to&amp;nbsp;&lt;span&gt;Series(excelRange2.Value[0],excelRange2.Value[1],excelRange2.Value[2])&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think of the excel node as just grabbing the data from excel and placing it into a list or an array.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the case of &amp;quot;A3:C3&amp;quot; it would be a simple list.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example it might return from excel {1,10,2}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then you target it with the index of each item in the list, for example number 1 would be index 0, number 10 would be index 1 and number 2 would be index 2.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hope that helps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe I could send you an example file for you to reference.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Wayne&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ExcelRange input for Expressions?</title><link>https://communities.bentley.com/thread/556676?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 19:47:25 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7c7c5098-7248-45a2-ac9e-810709fb13cb</guid><dc:creator>Christiaan Post</dc:creator><description>&lt;p&gt;Hi Wayne,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just keep struggling with the range, I think I do something wrong or I put it in the wrong fields&lt;/p&gt;
&lt;p&gt;Try to make this series form my excel sheet.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Series(excelRange2.Value[A3],excelRange2.Value[B3],excelRange2.Value[C3])&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/360/OpenBuildings_5F00_GS_5F00_03.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ExcelRange input for Expressions?</title><link>https://communities.bentley.com/thread/554213?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 09:12:24 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1d9ee612-7376-4a1e-8b8c-a99dcc40ab40</guid><dc:creator>Wayne Dickerson</dc:creator><description>&lt;p&gt;Hi Christiaan,&lt;/p&gt;
&lt;p&gt;A couple of things I can think of.&amp;nbsp;&lt;br /&gt;In the expression I believe you need to target you want the value.&amp;nbsp;&lt;br /&gt;so you can put in&amp;nbsp;&lt;span&gt;excelRange1.Value.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;That however would not work the way you would like if you have mixed content like Series(x,x,x). It will he returned as a string from excel.&amp;nbsp;&lt;br /&gt;I recall there was a way to remove the string from mixed content but I can&amp;rsquo;t recall at the moment. ToInt works for values but not in mixed I believe.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However you have all the information you need in excel. Columns A,B,C has the building blocks for the series function.&amp;nbsp;&lt;br /&gt;so you could just use those values directly.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Series(excelRange1.Value[0],excelRange1.Value[1],excelRange1.Value[2])&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That should do the job if you wanted a single Series from an excel range say &amp;rdquo;A1:C1&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You could also skip the expression node as well but sometimes it is nice to see the values :)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;hope that helps&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Wayne&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>