I need to extract the data from an excel sheet into csv or json format and then display the content in the form of charts(bar, pie and line) using javascript. I have been working on it since 2 days and not able to find any good source. Any help regarding this would be appreciated. Thank you.
-
1This is covered in a lot of tutorials such as Christophe Viau and I assume that you know how to get a spreadheet to csv. The other issue you could have is cross site scripting, in which case you'll need to use a local web server.user1614080– user16140802013-10-20 07:32:23 +00:00Commented Oct 20, 2013 at 7:32
Add a comment
|
1 Answer
You can also pull data from a google spreadsheet as CSV data like this:
var spreadsheet = "https://docs.google.com/spreadsheet/pub?key=youruniquekeyhere&single=true&gid=2&output=csv"
d3.csv(spreadsheet, function (error, data) {
// use your data here
});
Notice the output=csv at the end of that URL.
gid=0 is worksheet 1, gid=1 is worksheet 2 and so on. You must publish your worksheet to the web first to make it available.
In addition to Christophe Viau's tutorials, here are more resources: