Ticket T304478
Visible to All Users

load spreadsheet in read-only mode

created 9 years ago

Dear Support,

I've tried to find a property that could be set or method that could be called to prevent *any* changes to a given workbook and all its sheets, and didn't find any.

If that is somehow possible, could you please provide the steps that should be taken after loading the contents from a stream? I mean what will have to set in the TdxSpreadSheet object itself, and in each of the sheets in it, so that the user won't be able to change anything.

Thank you very much.

Best regards,
Carlos

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hello Carlos,

To prohibit end-user changes in your loaded documents, you can enable the TdxSpreadSheet.OptionsBehavior.Protected property and all the Options.Protected properties of your Sheet. Please review the "TdxSpreadSheetOptionsBehavior.Protected" help topic and related topics for additional information. In addition, I suggest that you take a look at other properties in the TdxSpreadSheet.OptionsBehavior properties set. They are very helpful in controlling the SpreadSheet behavior.

    Show previous comments (6)
    DevExpress Support Team 6 years ago

      You can use the ActiveControl property and the ShowException method to accomplish your task.

        Paulo, problem what exception already was raised, but i don't want it. And in main exception handler i must write what if exception is EdxSpreadSheetProtectionError and another my conditions (like ActiveControl) then ignore this:((

          But I understood you viewpoint :(

          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.