Ticket T330711
Visible to All Users

Does DevExpress.Spreadsheet.Workbook provide save with password method

created 9 years ago

[DevExpress Support Team: CLONED FROM T280482: Can I password protect an Excel file using ExportToXlsx?]
Hi,
Does DevExpress.Spreadsheet.Workbook provide save with password method?
Thanks.

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hello,
Currently, we support adding a password to a saved document only while exporting the document to XLS format. Please refer to the following code:

C#
Workbook wb = new Workbook(); wb.LoadDocument("test.xlsx"); wb.Options.Export.Xls.Password = "test"; wb.SaveDocument("test_password.xls", DevExpress.Spreadsheet.DocumentFormat.Xls);

For XLSX format, this functionality is not yet supported, because of complexity of supporting this feature for the mentioned format. We have this task in our TO-DO list, however, we have not yet decided in what exact version it will be implemented.
Do not hesitate to contact me if you have additional questions or need further assistance.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.