Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIP + password #29

Open
kazuser opened this issue Apr 26, 2024 · 1 comment
Open

ZIP + password #29

kazuser opened this issue Apr 26, 2024 · 1 comment

Comments

@kazuser
Copy link

kazuser commented Apr 26, 2024

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 kazuser changed the title Password + ZIP ZIP + password Apr 26, 2024
@kazuser
Copy link
Author

kazuser commented Apr 26, 2024

Test.xlsx

Pass: 123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant