Hi,
I need to load an excel file using the Infragistic.Excel component, insert some values in it and save it as a new document. The user must download this document for print out the document, but he cannot change anything from it. There is were my problem start! I load an excel with a protected sheet, and save it as a new document. This new document is protected, but if the user go to Tools --> Unprotect, he can unprotect it and change the values!There is a way to protect an Excel using a password?
Best regards!
There is currently no way to password protect an Excel document using the Excel assembly. You can submit a feature request for this: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
I tried the following scenarios:
Infragistics.Excel.Worksheet sheet = filename.Worksheets[0];
sheet.Rows[5].Cells[7].CellFormat.Locked =
ExcelDefaultableBoolean.False;// Cell locking disabled
sheet.Rows[5].CellFormat.Locked =
ExcelDefaultableBoolean.False; // Row locking disabled
ExcelDefaultableBoolean.True;// Cell locking
ExcelDefaultableBoolean.True; // Row locking, doesnt work.