input accept excel html

Solutions on MaxInterview for input accept excel html by the best coders in the world

showing results for - "input accept excel html"
Thiago
15 Jun 2017
1Add accept attribute to the input :
2accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
3
4<input type="file" name="file" id="file" class="form-control" required accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel">
5
6Other input types :
7
8CSV files (.csv): accept=".csv"
9
10Excel Files 97-2003 (.xls): accept="application/vnd.ms-excel"
11
12Excel Files 2007+ (.xlsx): accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" 
13
14Text Files (.txt): accept="text/plain"
15
16Image Files (.png/.jpg/etc): accept="image/*"
17
18HTML Files (.htm,.html): accept="text/html"
19
20Video Files (.avi, .mpg, .mpeg, .mp4): accept="video/*"
21
22Audio Files (.mp3, .wav, etc): accept="audio/*"
23
24PDF Files: accept=".pdf"
25