fpspreadsheet: Fixes the auto-detection of Excel 8

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1911 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat 2011-09-07 05:37:15 +00:00
parent 2c65794274
commit 62c89fcf1c

View File

@ -877,9 +877,9 @@ begin
begin
if SheetType = sfExcel8 then
begin
repeat
while True do
begin
try
SheetType := Pred(SheetType);
ReadFromFile(AFileName, SheetType);
valid := True;
except
@ -889,7 +889,9 @@ begin
valid := False
end;
end;
until valid or (SheetType = sfExcel2);
if valid or (SheetType = sfExcel2) then Break;
SheetType := Pred(SheetType);
end;
// A failed attempt to read a file should bring an exception, so re-raise
// the exception if necessary. We re-raise the exception brought by Excel 8,