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.