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.
You can protect the entire workbook by setting the Workbook.Protected property to True.
As far as whether this will get implemented, I cannot say. But the number of feature requests for a particular feature does play a big part in what gets implemented. So I will ask the Developer Support Manager to add you to this feature request and that will increase its priority.
For anyone else who may need this functionality the ability to password protect a workbook was added in 13.2 Service Release February 2014
As explained by Dimi here, we cannot support password protected files for legal reasons.
Hi Vince,
I was wondering if FR12065 was ever done or if it's on the list for the next release. I'm looking to password-protect a workbook.
Thanks,
- Ron
yaminih2,
I've just submitted feature request FR12065 for the functionality to password-protect a workbook or worksheet through our Excel engine to be added to a future version of the toolset.
For anyone else who is interested in seeing similar functionality in a future version of the NetAdvantage for .NET toolset, you can submit a feature request here. Remember, as Mike mentioned, the number of requests we receive for a given feature is one of the tools we use to prioritize what functionaltiy goes in to a given release.