If you want to colour the whole column in a excel table
Please change the index variable assignment
Index= updatedfile.rows.count+1
Do not add double quotes to this expression
Index should be variable type integer
Please change address the set range variable it should be “P1:P”+index.tostring