excel:
<input type="file"
id="avatar" name="avatar" accept=".xls,.xlsx,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
word:
<input type="file"
id="avatar" name="avatar" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document">
<input type="file"
id="avatar" name="avatar"
accept="image/png, image/jpeg">
header(‘Content-Type: application/vnd.ms-excel‘); //excel 2003
header(‘Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet‘); //excel 2007