HTML 5 API: Can I Check If My Csv File Has Certain Columns Before Uploading It?
I am making a webpage that uploads csv files to the server using the HTML5 file upload API. But before I upload I would like to verify if the csv contains certain columns. E.g. I r
Solution 1:
If your page/app only runs on a subset of browsers, you can use the File API to read the first part of the file (client-side) and determine if it has the necessary information.
Solution 2:
I think your problem is similar to How to parse a .csv file that is local to my system in a HTML5 document?.
You can do your test on the .csv files locally with the JS FileAPI. But you need to consider that HTML5 is a draft at this time and not a general implemented standard.
Further reading on parsing .csv files with JavaScript can be found here:
Post a Comment for "HTML 5 API: Can I Check If My Csv File Has Certain Columns Before Uploading It?"