07
Nov 12

QTP v11 “Locked cells cannot be modified”

Category: QuickTest Pro, Tools |

Tips & Tricks: Recently I ran into an issue where I received the error “Locked cells cannot be modified” when trying to modify a cell in an existing QuickTest Pro data table. 

Situation & Environment:
QTP v11
QC  v10
Windows7
Excel 2010

I had an existing QTP test script that had data in the Global Worksheet.  I needed to make a new “version” of it in the sense that we received major modifications to the existing process and I wanted to keep the old version around and create a new version for the new calendar year (this would still use version control for the script itself).  After saving as a new test script I begin making modifications.  I was able to change the test script code successfully and settings, but I noticed the data table was “grayed out” and when I tried to modify a cell I received the error “Locked cells cannot be modified”.

Solution:  This appears to be a bug that has not been resolved (or at least not in any of the patches I have) and when you perform a “save as” it appears to put the worksheets into a “protected” mode.  The only thing that I found to resolve the issue is to export the data table, remove the protection in Excel and then import it again.  You can do this by performing the following steps:

  1. In the QTP data table, right click and select “File > Export…”
  2. Save the file giving it any name you want and let it default to the “xls” file extension
  3. Open the exported file in Excel (the following Excel steps are based on Excel 2010)(don’t modify the data at all)
  4. In Excel select “Review” and you should see an option “unprotect sheet”, click on this so it changes to “protect sheet”.  By doing this you will have removed the protection.  Do this for each worksheet that you have data in.
    Excel UnProtect Sheet
  5. Save the file
  6. Now back in the QTP data table, right click in the Global Sheet and select “File > Import from file”
  7. Select the modified file to bring back into QTP
  8. Click OK to the warning (as long as you did not modifiy the data at all, the first row of data is your headers which is the way it should be
  9. The data table will update, although you won’t really notice anything because the only thing that actually changed was a setting in the file and not the data
  10. You will now be able to modify the data table again
  11. Don’t forget to save your test script to save your changes

 


by sloporto | About the author:

Related Posts

  • No related posts found.

You must be logged in to post a comment.

Name (required)

Email (required)

Website

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Share your wisdom



X