Asked • 03/19/19

HTML Input="file" Accept Attribute File Type (CSV)?

I have a file upload object on my page: with the following excel files on my desktop:> 1. file1.xlsx > 2. file1.xls> 3. file.csv I want the file upload to ***ONLY*** show `.xlsx`, `.xls`, & `.csv` files. Using the `accept` attribute, I found these content-types took care of `.xlsx` & `.xls` extensions... > `accept`= application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.XLSX)> `accept`= application/vnd.ms-excel (.XLS)However, I cannot find the correct content-type for an Excel CSV file! Any suggestions? EXAMPLE:

1 Expert Answer

By:

Ryan B. answered • 10/12/21

Tutor
New to Wyzant

Junior Software Engineer Specializing in JavaScript

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.