Using filters in @uifiledlg
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Using filters in @uifiledlg
I am using @uifiledlg to select an Excel worksheet as an input to my program. All seems to work as advertised with the exception of the Filter argument. I would like for the dialogue box to display only those files with an "xlsx" extension, but all files in the directory are displayed. I would note that using the filter "prg" does successfully list only those files with the .prg extension, so I guess the function is working properly within that narrow field. Am I doing something wrong, or does the filter only apply to .prg files?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using filters in @uifiledlg
The filter only supports "wf", "prg" or "db". The documentation should make this clearer, sorry.
Re: Using filters in @uifiledlg
OK--thanks. I guess you may consider this as a suggestion for future versions.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using filters in @uifiledlg
There's actually two types of filter going on. The one we currently support is basically "what type of thing am I opening/saving?" where the answer is workfile (i.e. a dataset including Excel, Stata, CSV, etc...), a database or a program.
Withing the workfile setting there is a secondary filter which allows you to specify the exact file type.
I've just added an option to the function which will go out in the next patch that allows you to, crudely, select which file type will be selected by default. It is just an integer value passed in as a string.
For example, to open a file-open dialog preselected to Excel:
Withing the workfile setting there is a secondary filter which allows you to specify the exact file type.
I've just added an option to the function which will go out in the next patch that allows you to, crudely, select which file type will be selected by default. It is just an integer value passed in as a string.
For example, to open a file-open dialog preselected to Excel:
Code: Select all
=@uifiledlg("", "wf", "open", "8")
Re: Using filters in @uifiledlg
Hi, it is quite a serious change for me that you added this fourth parameter as obligatory. Please update the Programming Reference as soon as possible, because there is no information about what values should be entered.There's actually two types of filter going on. The one we currently support is basically "what type of thing am I opening/saving?" where the answer is workfile (i.e. a dataset including Excel, Stata, CSV, etc...), a database or a program.
Withing the workfile setting there is a secondary filter which allows you to specify the exact file type.
I've just added an option to the function which will go out in the next patch that allows you to, crudely, select which file type will be selected by default. It is just an integer value passed in as a string.
For example, to open a file-open dialog preselected to Excel:Code: Select all
=@uifiledlg("", "wf", "open", "8")
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using filters in @uifiledlg
Yep, that 4th shouldn't have been compulsory. We will fix (to make optional).
Who is online
Users browsing this forum: No registered users and 2 guests
