My system is win 10, Lazarus 1.8.4,
An excel file is read and displayed normally but an error message "BOF record not found " is shown.
Can anyone please tell me why?
The follow is my code:
with OpenDialog1 do
if Execute then
begin
sWorkBookSource1.FileName:=FileName;
sWorkSheetGrid1.Enabled:=True;
Screen.Cursor := crHourglass;
try
workbook := TsWorkbook.Create;
try
Workbook.Options := Workbook.Options + [boReadFormulas, boAutoCalc];
Workbook.ReadFromFile(DataFileName, sfExcel2);
finally
Workbook.Free;
end;
finally
Screen.Cursor := crDefault;
end;
end;