Error during read with TAdvGridExcelIo

I created the simple example as in TMS Software | TAdvStringGrid Example

procedure TfmECACMainForm.Readexcelfile1Click(Sender: TObject);
begin
If ExcelOpenDialog1.Execute
then begin
Form10.AdvGridExcelIO1.XLSImport(ExcelOpenDialog1.Filename);
Form10.ShowModal ;
end;
end;

However I get an exception": 'The file "" is invalid'.

Do you try to load a valid .XLS file? (Not a .XLSX file, as TAdvGridExcelIO only supports .XLS files)

Thanks. Using XLS instead of XLSX was the solution. I debugged the code and saw that it was looking for a specific XLS signature. A slightly better error message (e.g. 'not an XLS file' instead of 'the file "" is invalid') would have helped here.
Any plans to support the XLSX format in the future?

XLSX is supported via

OK. Thanks.
I will give that a try.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.