There should be a cleaner way to do this:
var element = <HTMLInputElement> document.getElementById("btnExcel");
element.disabled = true;
Or if you prefer a one liner:
(<HTMLInputElement> document.getElementById("btnExcel")).disabled = true;
It seems getElementById and the like should be a generic method and accept a type parameter. That said, a generic method wouldn’t give you anything that typecasting doesn’t.