Pls find attached my current patchset against fpspreadsheet.
- Added DATE, TIME worksheet functions in Excel. Date output works ok; however you'll still need to manually switch formatting to date/time
- use fpc- provided tzipper function if on FPC 2.7.1 or higher as it has zip64 support
(had already supplied this to bugtracker) edit: can't remember if I had posted this already to the bugtracker, don't think so.
- Respect 32767 character limit in string fields in biff8/xlsx, same with limits in biff2, biff5 and deal with them the same as other overflow is dealt with: throw an exception when writing rather than (as currently) silently corrupting the output. Previously reported as mantis #24988
- cosmetic: added some more references to the openoffice excel documentation chapters
Edit: have only tested with empty times up to now but dates work fine; testing using something like:
SetLength(ExcelRPNFormula, 9);
ExcelRPNFormula[0].ElementKind := fekNum;
// Getting data out of a dataset;
// of course easier to just use a tdatetime or
// even specify a constant number for testing...
ExcelRPNFormula[0].DoubleValue := YearOf(TDataset(FDatasets[i]).Fields[TheColumn].AsDateTime);
ExcelRPNFormula[1].ElementKind := fekNum;
ExcelRPNFormula[1].DoubleValue := MonthOf(TDataset(FDatasets[i]).Fields[TheColumn].AsDateTime);
ExcelRPNFormula[2].ElementKind := fekNum;
ExcelRPNFormula[2].DoubleValue := DayOf(TDataset(FDatasets[i]).Fields[TheColumn].AsDateTime);
ExcelRPNFormula[3].ElementKind := fekDate; //end of date formula
ExcelRPNFormula[4].ElementKind := fekNum;
ExcelRPNFormula[4].DoubleValue := HourOf(TDataset(FDatasets[i]).Fields[TheColumn].AsDateTime);
ExcelRPNFormula[5].ElementKind := fekNum;
ExcelRPNFormula[5].DoubleValue := MinuteOf(TDataset(FDatasets[i]).Fields[TheColumn].AsDateTime);
ExcelRPNFormula[6].ElementKind := fekNum;
ExcelRPNFormula[6].DoubleValue := SecondOf(TDataset(FDatasets[i]).Fields[TheColumn].AsDateTime);
ExcelRPNFormula[7].ElementKind := fekTime; //end of time formula
ExcelRPNFormula[8].ElementKind := fekAdd; //add date and time
ExcelWorksheet.WriteRPNFormula(TheRow, TheColumn, ExcelRPNFormula);
gives formulas like
=DATE(2011,5,2)+TIME(0,0,0)
Would be happy to split this out in new patches and upload to mantis if somebody wants to commit

As usual, comments welcome as well.
Edit: removed attachment; newer version in other thread