27797 in words is written as :

Thousand Seven Hundred and Ninety Seven