Look at the sexual harassment laws where you live and rules at work?
Does he have a wife or fiancee or not? Sometimes just asking 'How's your wife?' can help..
If there's no one at work who you might like, you could also invent an imaginary boyfriend.. or talk about religion or such..
Or say you don't believe in work relationships and would prefer you guys to just be friends/co-workers.. (whichever applies)
Or describe your ideal man who's the opposite of what he is like.. (though this can also make him propose, lol. Depends how it's done, I guess..)
Some people just flirt and mean nothing by it.. Maybe he wants to boost your confidence?
On the other hand, you could also ask around (discreetly) to see if he has a 'reputation'? (Some people can be womanizers)
You could also point out that women don't find men who overcompliment them overly attractive?
But I understand you. I had guys interested in me that I thought, 'uggh, why?' lol..
On the other hand, some nice shy ones were too shy to approach, so, hmm..? If he's single at least give him kudos to be brave and nicely tell him he's not your type or you're not his type... (?)