Jump to content

Create password for zip/excel file programatically


Recommended Posts

ZIP and Excel files are two completely different things. For the Excel file, I assume the Save method provided by Excel has an optional password field. If not, you should search the Excel API to see how it's done.

The ZIP file presumably depends on the library you use to save the ZIP file. If it exposes a method of password protecting the file, you can use that. If it does not, you'll need to find a library which does. OpenG has a ZIP library which might allow this. If it doesn't, you might be able to extend it yourself by calling the relevant functions from the DLL.

Link to comment

OpenG has a ZIP library which might allow this. If it doesn't, you might be able to extend it yourself by calling the relevant functions from the DLL.

I can confirm that the OpenG ZIP library has password functionality, but I've never actually tested it. Considering that Rolf is the originator, I'm sure that this works flawlessly or he wouldn't have provided the interface on the VIs.

ZLIB Store

ZLIB_Store_File.png

Link to comment
  • 4 months later...

I can confirm that the OpenG ZIP library has password functionality, but I've never actually tested it. Considering that Rolf is the originator, I'm sure that this works flawlessly or he wouldn't have provided the interface on the VIs.

ZLIB Store

ZLIB_Store_File.png

I did test it but didn't make extensive tests. It seemed to work for any combination of OpenG compress -> ALZIP / 7-ZIP uncompress and vice versa as well as compress and uncompress in OpenG. This was enough for me to provide the parameter on the VI interface. I can't exclude the possibility that the generated password might not be compatible with certain other ZIP utilities, and I have also stopped using ALZIP a year or so ago, since they were getting worse and worse in advertisement and eventually tried to push an upgrade to a once free version on the users that was only a trial version and had to be purchased to continue using.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.