I wasn't referring to worship in church. I was referring to personal worship. And works in the verses you speak of wasn't what kept these people out of heaven, but the fact that they had no intimate relationship with God...I never knew you.
Then He will say to those on His left, ‘Depart from Me, you who are cursed, into the eternal fire prepared for the devil and his angels. For I was hungry and you gave Me nothing to eat, I was thirsty and you gave Me nothing to drink, I was a stranger and you did not take Me in, I was naked and you did not clothe Me, I was sick and in prison and you did not visit Me.’ Matthew 25:42