05-10-2017 01:55 PM
Could you give me an litte example?
05-10-2017 01:57 PM
yes - why not?
05-10-2017 01:58 PM
Try this:
Add the sheet names to the enum control, and they will be converted to strings
05-10-2017 02:10 PM
thanks.
I'm also confused. The output is an array, and should be an enum.
05-10-2017 02:17 PM
You said you want the user to select a sheet name stored in an enum, and that would drive the active displayed worksheet in excel. Assuming you are using the Report Generation Toolkit to do this, the input to the Excel Get Workstheet.vi is a string:
So you would need to format the selected enum value into a string:
05-10-2017 02:25 PM
Yes that's the way. But I still haven't got the enum. The output from the snip was an array.
Or am extremely stupid ? 😉
05-10-2017 02:31 PM - edited 05-10-2017 02:34 PM
I think I understand now. You are pulling in the excel sheet names into labview as an array of strings. You then want to populate an enum control with those strings, and have the user select one to change the active worksheet?
There is no way to edit the values of an enum at runtime that I am aware of.
05-10-2017 02:41 PM
@sirwin wrote:
I think I understand now. You are pulling in the excel sheet names into labview as an array of strings. You then want to populate an enum control with those strings, and have the user select one to change the active worksheet?
There is no way to edit the values of an enum at runtime that I am aware of.
As Ben previously mentioned an enum can only be edited at edit time, is fixed a runtime. You could use your "read in array of names" to populate a ring control, then use the output of that to index the original array of names to get the desired name to select the active sheet.
05-10-2017 02:47 PM
I didn't think about it that way. That would certainly work. Note to self...
05-11-2017 03:28 AM
Great !
Would you be kind to make a small example ?