Dear ALL,
I have a spreadsheet with data on plant specimens collected in some plots. The spreadsheet is read using the great FPSpreadsheet component (
https://wiki.freepascal.org/FPSpreadsheet). I want to be able to filter the rows of the spreadsheet, by executing SQL-like queries on the data (eg., for displaying only the plants belonging to a certain family, or all specimens from a given family collected at a certain locality, etc.) and displaying the filtered results in the same (or another) spreadsheet.
One way I devised (but have not tested!) of achieving that would involve exporting the spreadsheet data to a csv file and then using the ZMSQL (
https://wiki.freepascal.org/ZMSQL) component for performing the query on the data and display the results. But this seems very convoluted. Is there a way of doing this using only FPSpreadsheet?
I attach a sample project, including the original data spreadsheet in Excel97 format. This project includes a gross filter dialog (which is incomplete and buggy, but it should suffice to convey the general idea) to build SQL-like queries. See also the attached screenshot.
Thanks in advance for any assistance you can provide!
With
best wishes,