I am developing excel download & upload functionality using Java.
I have a link on my screen through which, user will download an excel.
I provide functionality to upload the excel. But, while uploading, I want restrict user to upload only that excel file which is downloaded to maintain security.
How will I be able to do that ?
I am using JXL API for Java.
EDIT: User will download the file, which will have all protected cells.
User will change the details in it and then re-upload it.
User may copy the content of the excel and save in another excel file and then add some junk data in it which may come across some security concerns.
To avoid it while uploading the file, I want to identify if the file is same as that is downloaded.
An idea would be to add an unique ID somewhere inside the file and lock those cells from editing.
You could check this tutorial on how to Lock or unlock specific areas of a protected worksheet
Also, you can compare the files' creation date timestamps and check if they're the same.