Hello Community,
I would like to build a dialog box which enables the user to choose file to read. The function I use is "Dialogs.BrowseForFile". The dialog box should allow the user to choose from multiple data types, e.g. .xls and xlsx. At the moment, with this function I can only show one option of this data type as shown below.
I would like to ask is there a possible way to add more data type to the filter? Or is there any other function which enables this multiple filter ?
Thanks in advance!
.png)
Kay Fischbach on
I assume you're using the Dialogs.getFilePath(...) method?
You can specify which file types are supposed to be available in that drop down menu with the second parameter of that method.
Example for xls and xlsx:
Dialogs.getFilePath("", "*.xls!!Worksheet Files|*.xls|Worksheet Files new|*.xlsx|", "", "Select a file", 0);The second parameter is a string, and it follows the following syntax
Now do all the following steps for each selectable list entry (append the following to the same string you started already)