We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Protecteng Cell Sheet

Thread ID:

Created:

Updated:

Platform:

Replies:

27732 Apr 17,2005 01:42 PM UTC Apr 19,2005 06:34 PM UTC WinForms 1
loading
Tags: XlsIO
Mohammad Abdullah
Asked On April 17, 2005 01:42 PM UTC

Hi , I''m trying to protect the sheets afetr sending the data to sheets but still any user can edit the sheet and it didn''t protect it , here is the code: SheetAll.Range["A10"].Formula = "SUM(B10:J10)"; SheetAll.Range["A12"].Formula = "SUM(B12:J12)"; SheetAll.Range["A14"].Formula = "SUM(B14:J14)"; SheetAll.Range["A16"].Formula = "SUM(B16:J16)+A14"; SheetAll.Range["A18"].Formula="SUM(B18:J18)+A16"; excelEngine.ThrowNotSavedOnDestroy = false; SheetAll.Range["A1:M26"].Text="Read Only"; SheetSearch.Range[1,1,CountSet,9].Text="Read Only"; SheetInfo.Range["A1:K23"].Text="Read Only"; SheetAll.Protect("syncfusion"); SheetSearch.Protect("syncfusion"); SheetInfo.Protect("syncfusion"); excelEngine.Dispose(); //Launching the Excel file using the default Application.[MS Excel Or Free ExcelViewer] System.Diagnostics.Process.Start(Application.StartupPath + @"\\repDepInfo.xls"); thanks

Administrator [Syncfusion]
Replied On April 19, 2005 06:34 PM UTC

Hi Mohammad, I am just pasting a copy of my Direc-Trac response for other developers who read this thread I took a look at PrintData and noticed that you were applying protect worksheet only after saving the spreadsheet to disk. Please try to set protection before you save the spreadsheet to disk. Thanks, Stephen. >Hi , I''m trying to protect the sheets afetr sending the data to sheets but still any user can edit the sheet and it didn''t protect it , here is the code: >SheetAll.Range["A10"].Formula = "SUM(B10:J10)"; > SheetAll.Range["A12"].Formula = "SUM(B12:J12)"; > SheetAll.Range["A14"].Formula = "SUM(B14:J14)"; > SheetAll.Range["A16"].Formula = "SUM(B16:J16)+A14"; > SheetAll.Range["A18"].Formula="SUM(B18:J18)+A16"; > excelEngine.ThrowNotSavedOnDestroy = false; > SheetAll.Range["A1:M26"].Text="Read Only"; > SheetSearch.Range[1,1,CountSet,9].Text="Read Only"; > SheetInfo.Range["A1:K23"].Text="Read Only"; > SheetAll.Protect("syncfusion"); > SheetSearch.Protect("syncfusion"); > SheetInfo.Protect("syncfusion"); > excelEngine.Dispose(); > //Launching the Excel file using the default Application.[MS Excel Or Free ExcelViewer] > System.Diagnostics.Process.Start(Application.StartupPath + @"\\repDepInfo.xls"); > >thanks

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;