Forum > FPSpreadsheet

Indexes in FPSpreadsheetDataset

(1/3) > >>

Hi, @wp!

Would it be possible to add IndexName and IndexFieldNames properties to the FPSpreadsheetDataset?

With best wishes,

TDataset has only rudimentary support of indexes. When a descendant has indexes it gets them from the underlying database engine, or, as in case of TBufDataset, creates them by itself.

Unfortunately I had built TsWorksheetDataset similar to TMemDataset because it is very simple, and therefore, providing an index is rather difficult.

On the other hand, TBufDataset has a very flexible infrastructure regarding the format of the data files based on so-called "packet readers". Therefore, I have the idea to speeze in fpspreadsheet as a new packet reader class. This way, TsWorksheetDataset would have the same functionality as TBufdataset, but would work now with worksheets rather than with xml files. The only problem is that the packet readers have a stream-based interface to read (and write) the data, but I am rather sure that TsWorksheetDataset must provide an already loaded workbook/worksheet.

Dear @wp,

Thanks for your answer. No problem - in fact, indexes would not be really useful to me anyway because I have been successful in using TsWorksheetDataSet in combination with the TZMSQL (, so that I can now fire (simple) SQL queries against the data stored in a spreadsheet, with the invaluable help of @paweld. See the attached demo application (notice that the SQL query in the demo will only work correctly with the fixed version of TZMSQL provided by @paweld and available here: That's what I wanted from the beginning!

Thank you very much!

With best wishes,

Implemented a sorting method to the old TsWorksheetDataset based on what is already available in TsWorksheet - this was very simple. Still no "true" IndexDefs etc, but I thinks this is enough and stop it here. Some more tests, and I'll move the repo to the "official" fpspreadsheet, probably as a separate package, laz_fpspreadsheet_dataset, or so.


I will install the new version right now. The new sort feature should really be quite useful.

Thanks a lot!

With best wishes,


[0] Message Index

[#] Next page

Go to full version