изменение
$('#id_thefile').attr('accept', '*.xlsx');
до
$('#id_thefile').attr('accept', '.xlsx');
или
Вы также можете напрямую добавить, что в HTML принимайте, как показано ниже
<html>
<head>
</script>
</head>
<body>
<!-- the input I want to change with jquery //-->
<input id="id_thefile" type="file" accept=".xls,.xlsx"/>