9787 in words is written as :

Nine Thousand Seven Hundred and Eighty Seven