ExcelRange input for Expressions?

Hi, 

Is it possible to add an Excel range for example one of the Yellow fields to an Expression, I can't get it work properly see image and I'm sure I use the right table etc.

   

Parents
  • Hi Christiaan,

    A couple of things I can think of. 
    In the expression I believe you need to target you want the value. 
    so you can put in excelRange1.Value. 


    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. 
    I recall there was a way to remove the string from mixed content but I can’t recall at the moment. ToInt works for values but not in mixed I believe. 

    However you have all the information you need in excel. Columns A,B,C has the building blocks for the series function. 
    so you could just use those values directly. 

    Series(excelRange1.Value[0],excelRange1.Value[1],excelRange1.Value[2])

    That should do the job if you wanted a single Series from an excel range say ”A1:C1”

    You could also skip the expression node as well but sometimes it is nice to see the values :) 

    hope that helps

    Wayne

  • Hi Wayne, 

    Just keep struggling with the range, I think I do something wrong or I put it in the wrong fields

    Try to make this series form my excel sheet.

    Series(excelRange2.Value[A3],excelRange2.Value[B3],excelRange2.Value[C3])

  • Hi Christiaan,

    I think the error is in the way you are trying to target the data from excel.

    I notice you don't have anything in the excelRange2 RangeAddress. 

    maybe this should be "A3:C3"

    Then you could update the Series to Series(excelRange2.Value[0],excelRange2.Value[1],excelRange2.Value[2])

    I think of the excel node as just grabbing the data from excel and placing it into a list or an array.

    In the case of "A3:C3" it would be a simple list. 

    For example it might return from excel {1,10,2}

    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.

    Hope that helps.

    Maybe I could send you an example file for you to reference.

    Thanks

    Wayne

  • Hi Wayne, 

    If it's possible to give me an example file this will be helpful for me.

    //Christiaan

    christiaan.postATSweco.nl

Reply Children