TurboPack / Abbrevia

Abbrevia is a compression toolkit for Delphi and C++Builder.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZIP + password

kazuser opened this issue · comments

How to open a password-protected *.xlsx?

var
  Li: integer;
  Lu: TAbUnZipper;
begin
  Lu := TAbUnZipper.Create(nil);

  try
    Lu.ArchiveType := atZip;
    Lu.ForceType := true;
    Lu.FileName := FFile;
    Lu.Password := FPass;

    for Li := 0 to Lu.Count - 1 do Memo1.Lines.Add(Lu.Items[Li].FileName);

  finally
    Lu.Free;
  end;
end;

Without a password the file opens ok:
image

... but with a password it crashes with an error :(
image

Project1.zip

Test.xlsx

Pass: 123