Not for the whole sheet, but there are column and row formats which are applied to all empty and new cells in the corresponding column or row (http://wiki.lazarus.freepascal.org/FPSpreadsheet#Columns_and_rows - a bit hard to find, though...).
See attached demo.
Wow! This is fast. While waiting for your reply, I was trying the following code which is very slow when there are more than 10000 rows:-
ws.GetCell(9999, 25);
wsGrid1.NumberFormats[1, 1, GetLastColNumber +1, GetLastRowNumber +1] := '#,##0.00';
For the benefit of other user who may be interested, I have modified your code slightly and put it in an event handler as follows:
procedure TForm1.Button1Click(Sender: TObject);
var idx, ii: Integer; fmt: TsCellFormat;
begin
InitFormatRecord(fmt);
with wbSource do
begin
fmt.NumberFormatIndex := Workbook.AddNumberFormat('#,##0.000');
fmt.UsedFormattingFields := fmt.UsedFormattingFields + [uffNumberFormat];
idx := Workbook.AddCellFormat(fmt);
for ii := 0 to 25 do // col A to Z
Worksheet.WriteColFormatIndex(ii, idx);
end;
end;