The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Want to extract values from excel and use in 'data item in 'Calculate data' operator ('sensor link')

Himanshu_PantHimanshu_Pant Member Posts: 46 Learner II
I have an excel which contain a column name. I want to use the values of column name in 'data item' in 'Calculate data' operator ('sensor link'), so that manual efforts of adding values in 'data item' will get reduced.

Answers

  • kaymankayman Member Posts: 662 Unicorn
    You can use 'rename by example' operator to do something like this, if your first row contains your labels you just add row number 1 (the default).

    If your labels are all in a row you may need to pivot first.
  • Himanshu_PantHimanshu_Pant Member Posts: 46 Learner II
    Actually here I am not looking for renaming. I want to use all the values of a column (may by using a macro) in 'edit parameter list' of 'data item' in 'Calculate data' operator ('sensor link'). I want to avoid the process of adding the parameter manually.
  • kaymankayman Member Posts: 662 Unicorn
    Ah, in that case you probably need to combine the loop examples and the extract macro operators.
    So you loop through the example, for each example you extract the value you need to a macro, and then use that macro for your sensor link.

    Something like that...
  • Himanshu_PantHimanshu_Pant Member Posts: 46 Learner II
    ya, that was my first approach. But Since the dataset is high, the system is getting hanged. So I was looking for a process which doesn't use loop. Instead, if we can directly supply value to 'edit parameter list' of 'data item' in 'Calculate data' operator ('sensor link').
  • Himanshu_PantHimanshu_Pant Member Posts: 46 Learner II
    @mschmitz Can you please help me with this?
  • kaymankayman Member Posts: 662 Unicorn
    Do you use the 'remove unused values' operator during your loop?
    I'd recommend this for bigger sets, as this way you only use the relevant data, while otherwise the 'hidden' metadata remains part of your flow. 

    This can have a huge effect on speed and memory when dealing with loops and filters on bigger sets.

    I use it by default on every step where I need to filter or loop. 
  • cerdocerdo Member Posts: 3 Learner II
    edited August 2021
    Any solution for this?

    Tried "Set Parameters from ExampleSet" from Toolbox, but not able to set values for enumeration.

    @yyhuang can you help with this case.
Sign In or Register to comment.