How to lock a cell in an Excel export?

9 posts, 0 answers
  1. Tyler
    Tyler avatar
    7 posts
    Member since:
    Mar 2012

    Posted 27 Sep 2012 Link to this post

    I am exporting a report in Excel format and I was curious if there is a way to lock a particular column in the spreadsheet so that it is not editable.
  2. Steve
    Admin
    Steve avatar
    10940 posts

    Posted 27 Sep 2012 Link to this post

    Hello,

    There is no support for such functionality in the Excel rendering extension.

    Regards,
    Steve
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  3. Izak Joubert
    Izak Joubert avatar
    5 posts
    Member since:
    Jul 2012

    Posted 17 Apr 2013 Link to this post

    Hello,

    I am using Reporting Q1 2013. I have the same requirement as the original poster.
    I need to lock certain columns during Excel Export.
    Is it possible?

    Thanks You.
  4. IvanY
    Admin
    IvanY avatar
    417 posts

    Posted 22 Apr 2013 Link to this post

    Hi Tyler,

    As stated in the previous post this functionality is not supported since it is specific to Excel. Perhaps you can write a macro or use another library to further process your exported reports.

    Kind regards,
    IvanY
    the Telerik team

    Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

  5. Gary
    Gary avatar
    3 posts
    Member since:
    Jan 2013

    Posted 07 May 2013 Link to this post

    Private Sub lockColumn()
        ActiveWorkbook.ActiveSheet.Cells.Locked = False
        ActiveWorkbook.ActiveSheet.Columns(2).Locked = True
        ActiveWorkbook.ActiveSheet.Protect
    End Sub
    This is a simple macro to lock a column.

    First you need to remove the locked status from the worksheet cells (it's on by default)

    Then set it back on for the columns you want locked.

    Then enable protection.
  6. Pinaki
    Pinaki avatar
    1 posts
    Member since:
    Sep 2017

    Posted 07 Sep 2017 in reply to Gary Link to this post

    I am using Angular JS to create my UI and want to export the grid into excel with selected columns locked. Can this be done? 
  7. Katia
    Admin
    Katia avatar
    693 posts

    Posted 12 Sep 2017 Link to this post

    Hi Pinaki,

    Reports are exported to Excel formats according to Design Considerations for Excel Rendering. Locking of the columns is not supported. 
    Freezing of cells is possible only if they are in the Page sections - check Page Headers and Footers section in the linked article.


    Regards,
    Katia
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Shubham
    Shubham avatar
    1 posts
    Member since:
    Aug 2019

    Posted 30 Aug Link to this post

    I am also have a same requirement. I want to lock specific columns before exporting the excel so that user can not modify them after exporting. 

    Please help me if there is any other way to achieve this. 

    Note- I am using angular and typescript for development. Any solution supporting this two will be helpful

  9. Todor
    Admin
    Todor avatar
    397 posts

    Posted 04 Sep Link to this post

    Hi Shubham,

    You may use a third-party tool or macro to lock the required cells after the report has been exported to Excel. We do not support locking cells outside the Page sections of the report.

    Regards,
    Todor
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top