Well, that's how the browser behaves.
you can still restrict the file to be submitted via a basic JQuery/JavaScript validation:
var ext = $('#files').val().split('.').pop().toLowerCase();
if(ext !== 'xls' && ext !== 'xlsx') {
alert('Please upload excel file only.');
return false;
}
Javascript version:
var fileName = document.getElementById('files').value.toLowerCase();
if(!fileName.endsWith('.xlsx') && !fileName.endsWith('.xls')){
alert('Please upload excel file only.');
return false;
}