12-23-2020 05:53 AM
Hi,
I have an application where I am reading Excel sheet and displaying the data in MC column list box.
I need to have a provision where user can apply filters on Column Header. The filter view shall populate all the data in that respective column and with checkmarks placed I can select only necessary data to view
Is it possible?
If yes, a sample VI would be really helpful.
12-23-2020 07:08 AM
@SuLAB wrote:Is it possible?
If yes, a sample VI would be really helpful.
Sure, that's possible.
Problem is there are tons of ways to do it. Each way will be quite some work (like, hours-days).
How do you get the data from Excel?
How do you want to filter? Text? Regular expression? Value? Value range? Each column it's own filter? Etc.
What in particular is the problem to make this? The GUI? Handling the data? Handling the events? The filtering?
I'd probably use a SQL query to get the Excel data. Then the filters could (maybe) be translated to the query, and a new query with changed filters would simply return the filtered results.
12-23-2020 09:17 AM
Hi,
Please find answers to your questions as below -
1. I get the data from Excel in 2d array of string which I pass to MC Listbox.
2. The application need is same as that of Excel filter.
When applied it should populate all the data in the respective column with checkmarks against it the search option, ok and cancel button. PFA screenshot for reference as in Excel.
3. I would say, I need all of these together in this application. So that I can view the data, filter it, ,make necessary changes in the selected data, and save back to excel
I really don't know SQL and need simple ways to achieve it if there are any.
12-24-2020 03:15 AM
@SuLAB wrote:I really don't know SQL and need simple ways to achieve it if there are any.
There isn't.
This will require work. This isn't absolute beginner stuff. Of course you can raise the bar and learn...
I don't have a clear recollection of how the filters work in Excel..
I'd start with abstractions. This is not something that is going to work well (maintainable, extendable) in a one liner. This requires logic that simply won't fit in one big main VI.
You'd need a good 'divide and concur' tactic. For me, that would mean doing a OO breakdown. But any separation into libraries, groups, functionality would be better than the one liner.