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.
Unfortunately, activation email could not send to your email. Please try again.

lock cell but allow column width and height to be adjustable.

Thread ID:





67525 Aug 21,2007 05:53 PM Mar 16,2018 10:00 PM ASP.NET Web Forms (Classic) 7
Tags: XlsIO
Craig Bart
Asked On August 21, 2007 05:53 PM

lock cell but allow column width and height to be adjustable. can you do this? thanks.

Sarathi D [Syncfusion]
Replied On August 21, 2007 08:59 PM


Thank you for posting your query to us.

The row and column height of a locked cell can be adjusted using the rowheight and column width properties.

I have created a sample based on this and it is available in the following link.


Please run the sample and let me know if this satisfies your requirement.


Craig Bart
Replied On August 27, 2007 03:59 PM

What about from the excel sheet? After it's locked can i adjust row and height from excel? That's what i need to do.

Sarathi D [Syncfusion]
Replied On August 27, 2007 08:54 PM


With the current implementation it is not possible to adjust the row and height of a locked cell.

sorry for the inconvenience.

Please let me know if you have any further queries.


Replied On August 28, 2007 11:30 AM

If I understood you correctly, you need to create worksheet that is protected but users can change row height and column widht using MS Excel. This can be done using following code
IWorksheet sheet = book.Worksheets[ 0 ];
ExcelSheetProtection options = ExcelSheetProtection.FormattingColumns | ExcelSheetProtection.FormattingRows | ExcelSheetProtection.UnLockedCells | ExcelSheetProtection.LockedCells;
sheet.Protect( "test", options );

Sarathi D [Syncfusion]
Replied On August 29, 2007 01:35 PM

Hi ,

Sorry for the inconvenience caused.

Your code snippet is working fine for resizing the locked cells using Essential XlsIO. Please do let me know if you have any other technical questions or I can be of any other assistance. I will be glad to assist you.

Thank you for your continued interest in Syncfusion Products.

Best regards,

Craig Bart
Replied On September 10, 2007 10:52 AM

Thank you ami!!!

Replied On March 16, 2018 10:00 PM



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.

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.