Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There is an Excel file which I import from a specific network path or local path, and that Excel file is exported from another vendor aplication. The problem is that the Excel file is editable.

Is there any way I can lock the Excel file or make it un-editable? It would be acceptable to apply this lock and/or remove the editability from the containing folder as well.

share|improve this question

migrated from stackoverflow.com May 14 '12 at 12:06

This question came from our site for professional and enthusiast programmers.

    
Have you changed the permissions to the file on the machine where it is located? i.e. File properties - check 'Read only'? –  rudeovski ze bear Apr 24 '12 at 3:12
    
ya that is not the solution because any user can change the property setting. i want some thing i can do it by code. or to lock the File. –  vish's Apr 24 '12 at 4:35
    
How is the file being exported? User initiated from vendor application? –  Pynner Apr 24 '12 at 11:58
    
its been exported to a specfic shared folder from vendor apllication. –  vish's Apr 24 '12 at 13:18
add comment

2 Answers 2

An Excel spreadsheet can have a password to modify. Under Save, click on the Tools dropdown and then General Options. If you implement this, the spreadsheet can not be modified unless you know the password.

modify password

share|improve this answer
add comment

You can make cells uneditable in excel, by using the "protect" option.

Could any of the following links help you?

Link 1 Locking cells

Link 2 generated by asp.net

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.