Avatar of dvcphp
dvcphp
 asked on

CSV file in Web page using Jquery

Hi All,

How can I import a CSV file in a Web page using Javascript. is there a plugin for this.

Thanks
Scripting LanguagesjQuery

Avatar of undefined
Last Comment
dvcphp

8/22/2022 - Mon
Michel Plungjan

I would consider
$("#someContainerId").load("/somefile.csv");
But tell us more
dvcphp

ASKER
I have to create an input type file,where I can import the cvs file from EXCEL in to my webpage.Here,I am checking if the file is of the type csv only.When it is selected,I have to display that file on the page.Please let me know how to do this.

http://jsfiddle.net/em39L/
ASKER CERTIFIED SOLUTION
Kiran Sonawane

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Michel Plungjan

Due to security restrictions, you will need to send the file to the server. You can return JSON for convenience? Alternative for the newest browsers may be the fileReader http://www.html5rocks.com/en/tutorials/file/dndfiles/
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
dvcphp

ASKER
I tried the plugin but its not working.This is the script I put to include the plugin.
<script src="csv2table.js" type="text/javascript"></script>
and the code you provided.Please let me know why it is not working.
dvcphp

ASKER
Please disregard the above comment since the plugin is working now but the below code on the link is working for one(1) csv file but I need the code  to display multiple csv files on the Webpage using Jquery



http://jsfiddle.net/u9CT9/ 

Please let me know if I am not clear.


Thanks
Michel Plungjan

Not really fair to just close when most comments are useful and relevant
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
dvcphp

ASKER
I have re-framed the question in order to get the exact solution to my question.
I have used csv2table plugin but I want to select and display the chosen csv file.
My question is half solved and I need help for the other half.
In order to start the other question ,I gave points to the answer that matched my solution and have posted a new question regarding the same topic.
Please help.
Thanks a lot Experts.