XLSRWException when reading password protected files.
Posted: Mon Aug 20, 2018 2:22 pm
Hello!
I am unable to open password protected files (xlsx and xls). In both cases I receive XLSRWExceptions.
Test files can be downloaded from this link:
https://fileshare.jam-software.de/share ... id=0vtUzb9
Password is: 1234
Thanks for your help.
I am unable to open password protected files (xlsx and xls). In both cases I receive XLSRWExceptions.
Test files can be downloaded from this link:
https://fileshare.jam-software.de/share ... id=0vtUzb9
Password is: 1234
Code: Select all
try
lXLSReadWrite := TXLSReadWriteII5.Create(Self);
try
lXLSReadWrite .Filename := lFilePath;
lXLSReadWrite .Password := lPassword;
lXLSReadWrite .Read;
except
// => Exception occurs
Exit;
end;
finally
FreeAndNil(lJAMXLSReadWrite);
end;