Yes, It works...
So unexpected users can drop a TsWorksheetGrid and it will all work with autoexpanding when accessing a cell beyond the current sheet.
I did find something strange. Normally you would do sWorksheetGrid1.SaveToSpreadsheetFile (because you wouldn't have knowledge of the "dummy" WorkbookSource which is connected but for the hell of it I tried sWorksheetGrid1.WorkbookSource.SaveToSpreadsheetFile(). It gave me an error on this line:
procedure TsWorkbookSource.SaveToSpreadsheetFile(AFileName: String;
AOverwriteExisting: Boolean = true);
begin
if FWorkbook <> nil then begin // <-------- ERROR
Which I found strange. If there is a dummy TsWorkbookSource shouldn't the FWorkbook be nil (or a dupicate of sWorksheetGrid1.Workbook)?
Project project1 raised exception class 'External: SIGSEGV'.
In file 'fpspreadsheetctrls.pas' at line 1025:
if FWorkbook <> nil then begin
Or is the dummy TsWorkbookSource (FInternalWorkbookSource) you created not a full-fledged dummy TsWorkbookSource?
In the end it doesn't really matter because you wouldn't access the dummy WorkbookSource but I did find it strange.
Testcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
// this works
sWorksheetGrid1.Worksheet.WriteText(99, 0, 'aaa');
sWorksheetGrid1.Worksheet.WriteFontStyle(99, 0, [fssBold]);
ShowMessage('99 worked');
// now works too
sWorksheetGrid1.Worksheet.WriteText(120, 0, 'aaa');
sWorksheetGrid1.Worksheet.WriteFontStyle(120, 0, [fssBold]);
ShowMessage('120 worked');
// this works as expected
sWorksheetGrid1.SaveToSpreadsheetFile('c:\temp\test.xlsx');
// this gives an error
sWorksheetGrid1.WorkbookSource.SaveToSpreadsheetFile('c:\temp\test.xlsx');
end;