View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0014466||Lazarus CCR||-||public||2009-08-31 08:14||2011-12-01 07:29|
|Reporter||Torsten Bonde Christiansen||Assigned To||Felipe Monteiro de Carvalho|
|Summary||0014466: FPSpreadSheet - Autodetect file format.|
|Description||I would like to request an autodetect feature for the FPSpreadSheet packages. |
Currently when using the TsWorkBook.ReadFrom[File|Stream] procedure, it is required that your specify the format. It would be a great help if the TsWorkBook supported some sort of autodetect function, which only take the filename open the file based on the format of the file.
|Tags||No tags attached.|
Could you propose an algorithm to do that?
BIFF2 has a marker, so that should be trivial to detect. Now BIFF5 and BIFF8 are OLE documents, and while we can detect if it's an OLE document, it's harder to detect if it's either BIFF5 or BIFF8. The other formats are even harder, because they are zipped and trying to unzip something without knowing it is zip might bring all kinds of errors.
Not at the moment no. I am not at all into how the file formats of BIFF's and .ODS's are constructed.
If i get the time I'll have a look at the specifications and perhaps see if I can device and algorithm.
I added a ReadFromFile function which will try to guess the format from the extension in rev 1642
In case of .xls it will assume Excel 8.
|2009-08-31 08:14||Torsten Bonde Christiansen||New Issue|
|2009-08-31 08:30||Vincent Snijders||LazTarget||=> -|
|2009-08-31 08:30||Vincent Snijders||Assigned To||=> Felipe Monteiro de Carvalho|
|2009-08-31 08:30||Vincent Snijders||Status||new => assigned|
|2009-09-02 17:23||Felipe Monteiro de Carvalho||Note Added: 0030335|
|2009-09-03 07:25||Torsten Bonde Christiansen||Note Added: 0030354|
|2009-09-03 17:52||Vincent Snijders||Project||Packages => Lazarus CCR|
|2011-05-25 13:53||Felipe Monteiro de Carvalho||Status||assigned => resolved|
|2011-05-25 13:53||Felipe Monteiro de Carvalho||Resolution||open => fixed|
|2011-05-25 13:53||Felipe Monteiro de Carvalho||Note Added: 0048577|
|2011-12-01 07:29||Torsten Bonde Christiansen||Status||resolved => closed|