TurboPack / Abbrevia

Abbrevia is a compression toolkit for Delphi and C++Builder.
115 stars 46 forks source link

ZIP + password #29

Open kazuser opened 2 months ago

kazuser commented 2 months ago

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

kazuser commented 2 months ago

Test.xlsx

Pass: 123