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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





67525 Aug 21,2007 09:53 PM UTC Mar 17,2018 02:00 AM UTC ASP.NET Web Forms (Classic) 7
Tags: XlsIO
Craig Bart
Asked On August 21, 2007 09:53 PM UTC

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

Sarathi D [Syncfusion]
Replied On August 22, 2007 12:59 AM UTC


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 07:59 PM UTC

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 28, 2007 12:54 AM UTC


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 03:30 PM UTC

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 05:35 PM UTC

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 02:52 PM UTC

Thank you ami!!!

Replied On March 17, 2018 02:00 AM UTC



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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