Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / How to lock/unlock excel cells?

How to lock/unlock excel cells?

New Discussion
Tahir
Tahir asked on May 3, 2017 2:59 PM

I am using ignite UI library. Is there a way to lock/unlock the some excel cells? I guess there must be a way. Any help would be much appreciated.

Sign In to post a reply

Replies

  • 0
    Divya Jain
    Divya Jain answered on Apr 26, 2017 8:46 PM

    Hello Tahir, 

    All cells are Locked by default. You must set Locked to False and then set Protected to True on the worksheet. Then you will be able to edit only the cells which are not locked. 

    Your code would be like this :

    worksheet.locked = true 

    You can also refer the below post and an online document for more information:

    https://www.infragistics.com/community/forums/t/9912.aspx 

    http://help.infragistics.com/Help/Doc/wpf/2012.1/clr4.0/html/InfragisticsExcelEngine_Disable_Editing_of_a_Worksheet.html 

    Please let me know if you need further assistance.

    • 0
      Tahir
      Tahir answered on Apr 27, 2017 7:28 AM

      Hi Divya,

      The post you have shared is about locking cells in C#. I want to lock/unlock certain cells using the JavaScript Library. The language has to be JS. Please reply ASAP.

      • 0
        Tahir
        Tahir answered on Apr 27, 2017 8:07 AM

        I am using Ignite UI's Jquery excel Library.

  • 0
    Tahir
    Tahir answered on Apr 27, 2017 9:10 AM

    I achieved this with the following code/steps:

    1. By first making the entire excel sheet protected by using the code:

        sheet.protect();                   {sheet is my worksheet name}

    2. Then by unlocking certain cells of excel sheet using the code:

        sheet.getCell('H'+j).cellFormat().locked(false);          {where H is the column name and j is a row number, an integer value}

    Hope that helps someone else.

    • 0
      Tahir
      Tahir answered on Apr 27, 2017 10:41 AM

      Now my only query is, How can we make the excel sheet password protected using ignite ?UI jquery library?

      • 0
        Divya Jain
        Divya Jain answered on Apr 27, 2017 8:28 PM

        Hello Tahir,

        Thank you for the update. 

        To make the excel sheet password protected you can use ‘SetFileWriteProtectionPassword ’ method which is use to set the password to protect the file from automatic writes. 

        Please let me know if you need further assistance.

      • 0
        Tahir
        Tahir answered on Apr 28, 2017 7:51 AM

        Hi Divya,

        You have again suggested me an answer for ASP.Net MVC. I have already shared the context, I need answer for Jquery Library.

      • 0
        Divya Jain
        Divya Jain answered on Apr 28, 2017 8:45 PM

        Hello,

        I did some research and not able to find any equivalent property for the JavaScript Excel library.

        So i am discussing this matter with the development team and can provide you an update when i will hear them back.

        Meanwhile if you have any question or concern please let me know.

      • 0
        Divya Jain
        Divya Jain answered on May 1, 2017 4:09 PM

        Hello Tahir,

        I am still waiting from the development team for their input,i can update provide you an update when 

        I will hear from them.

      • 0
        Tahir
        Tahir answered on May 2, 2017 7:17 AM

        Hi Divya,

        Yes please do update me once you get any update from the development team.

      • 0
        Divya Jain
        Divya Jain answered on May 3, 2017 2:59 PM

        Hello Tahir,

        After further discussion with the development team i got the information that passwords are not currently supported in the javascript version.it is determined to be a new product idea.

        You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com&gt;.

        Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.

        Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it.  You can also link back to this thread for additional details.

        Thank you in advance to submitting your product idea.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Tahir
Favorites
0
Replies
11
Created On
May 03, 2017
Last Post
9 years, 6 months ago

Suggested Discussions

Created by

Created on

May 3, 2017 2:59 PM

Last activity on

Feb 18, 2026 11:10 AM