TAdvGridWorkbook.Create problem

Hello, maybe I didn't read properly manual, but if I try to create programmatically TAdvGridWorkbook exemplar, I have error if i don't add Book.Parent := form1;


procedure TfEventList.Button11Click(Sender: TObject);
var
  Book: TAdvGridWorkbook;
  ExcelIO: TAdvGridExcelIO;
begin
  Book := TAdvGridWorkbook.Create(form1);
  Book.Visible := false;
  //Book.Parent := form1; // uncomment to get code without errors
  Book.Sheets.Clear;

  FillSheets(Book);

  ExcelIO := TAdvGridExcelIO.Create(form1);
  ExcelIO.Options.ExportHardBorders := true;
  ExcelIO.AdvGridWorkbook := Book;
  ExcelIO.GridStartRow := 0;
  ExcelIO.GridStartCol := 0;
  ExcelIO.Options.ExportShowInExcel := true;
  ExcelIO.XLSExport('c:\test.xls');
  Book.Free;
  ExcelIO.Free;
end;

And my second question is how to export .XLS file with filters like here?


For this kind of operation, it is needed that a control window handle is created and the control window handle is only created when you set the Parent (as is the case with other VCL controls)

OK.
Then second question is, how to set filter in excel file like on screenshot in first post?

Also I tested speed, when exporting with AdvGridExcelIO1.XLSExport('c:\test.xls')
it is much slower and program freezes, but with flexcel it is very fast.
Why is so big difference?

We are not aware of performance differences.
Please provide more details on the amount of data in the grid you have and details to allow us to reproduce a program freeze.

TAdvGridExcelIO will not create filters in its export.