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.
06-12-2024 08:19 AM
Hi,
sorry to post here, this was the closest to my problem, I thought maybe you could help.
I am using an SQL quary to read data into a MCLB, I have many rows, and want to build a search box for user to input the name they are looking for, hit search button, and hopefully the row containing this entry will be marked. The entries are strings. Can you recommend where to start or how to implement this?
06-12-2024 08:37 AM - edited 06-12-2024 08:38 AM
Hi Seli,
@LZD_Sydney wrote:
I am using an SQL quary to read data into a MCLB, I have many rows, and want to build a search box for user to input the name they are looking for, hit search button, and hopefully the row containing this entry will be marked. The entries are strings. Can you recommend where to start or how to implement this?
So you have a 2D array of strings to be displayed in your MCLB:
What have you tried and where are you stuck?
06-12-2024 08:59 AM
Thanks for the quick reply. This is my code sofar.
I don't know how to get the index as a single number, basically the row number, and how to scroll down to/highlight it, as you mentioned above.
06-13-2024 01:44 AM
Hi Seli,
@LZD_Sydney wrote:
I don't know how to get the index as a single number, basically the row number, and how to scroll down to/highlight it, as you mentioned above.