HTML Input=”file” Accept Attribute File Type (CSV)
Well this is embarrassing… I found the solution I was looking for and it couldn’t be simpler. I used the following code to get the desired result. <label for=”fileSelect”>Spreadsheet</label> <input id=”fileSelect” type=”file” accept=”.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel” /> Valid Accept Types: For CSV files (.csv), use: <input type=”file” accept=”.csv” /> For Excel Files 97-2003 (.xls), use: <input … Read more