0

html table data exporting into csv file ,it's happening but i want to make csv file password protected using javascript .is it possible ? or another way to do same thing .Thanks in Advance

user2834664
  • 43
  • 1
  • 7

1 Answers1

0

On the surface a CSV file is just a data exchange format, where fields are separated by commas and each record goes on a single line.

Comma Separated Values Standard

This specification itself wouldn’t deal with password protection.

But can you do something like zip the csv. Then that would require a password before uncompressing.

Password Protect a Zip File SO

In that link someone called exec to zip a file with password protection.

I do not know exactly the details of what you are intending to accomplish, but basically you can scramble a CSV all you want and make it unreadable without decryption, but since that isn't part of the standard, anyone getting that file wouldn't know what to do with it. If you control both the encryption and decryption, then you don't need zip.

You could just use an encryption library Javascript AES Encryption

Community
  • 1
  • 1
Robert Dupuy
  • 857
  • 5
  • 10
  • I have checked for password protected zip using java script but i did not get any example for password protected zip folder so using https://stuk.github.io/jszip/ js library, I can make zip folder but not able to make it password protected folder . – user2834664 Sep 22 '15 at 06:56