AnsweredAssumed Answered

PTB: Choose Excel-Worksheet  with RadioButton, then extract data with Group List

Question asked by Raoul Kirner on Feb 22, 2018


I have the following situation: I have an Excel file, my partslist colleagues and I are using together, where different categories of parts are sorted on different worksheets.

I would like to transfer data from this file to SW, to populate the textbox in drawings.


So ideally I would like to program PTB to do as follows:

1. Choose which type of component I am about to make a drawing of, i.e. which Worksheet in my Excel file to use

2. Access the data in this worksheet (columns are equally named and spaced on the different worksheet)

3. Write this data to Custom Properties


The difficulties I am facing are

1. Either I hardcode a Group List for every worksheet - no problem so far - but then I cannot populate the same Custom Property from different Group Lists (which would be necessary, as the Group Lists are actually copies, only referring to different worksheets)

2. Use RadioButtons or a List to populate a Custom Property with the name of the Worksheet, but then I cannot find how to use this property to set the according worksheet in the Group List afterwards (Area: $PRP:"ComponentType"(A1:Z2) doesn't work, unfortunately, with ComponentType being the Custom Property containing the name of the Worksheet).


Did anyone encounter similar problems, and could you hint me in the right direction to solve this issue?


Thanks a lot!