Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How I can make .csv file password protected?

Which is input file for my MFC dialogbased project.

I don't want anyone can modifi .csv file except me.

Thank you.
Posted
Comments
[no name] 27-May-14 10:44am    
You don't. If you don't want someone modifying the contents of your file, you need to store the contents in a container that can be password protected.

1 solution

A CSV file is just a text file, so there is no mechanism for adding a password.

You could try one of the following instead:

1. Encrypt the file using checksums to determine it has been modified.

2. Store the file in a restricted folder

3. Use something like winzip or 7-zip to store the file in compacted format with a password on the zip.

4. Store the data in an Excel file that is password protected

5. Store the data in a local database that is password protected (e.g. Access, LocalDb, SQLite)

There may be other options but that's all I can think of at the moment
 
Share this answer
 
Comments
peoria123 29-May-14 11:18am    
Hi,

I have used 7-zip to store the file in compact format with password protected on zip ..How I can uesed password protected file as input to my project without unzip. don't want to everybody can see that file data.

Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900