I am working on D3 js collapsible tree layout, i want to know is there any way we can directly feed the data from excel file rather than using json object file?
Asked
Active
Viewed 8,019 times
2
-
An Excel file has the extension .xlsx, so the answer is no. Using Excel you can save the file as CSV, and then load it using `d3.csv`. There are other JS libraries that parse xlsx spreadsheets, though. – Gerardo Furtado Jan 29 '18 at 06:06
-
On top of that, a tree layout uses hierarchical data... good luck encoding the hierarchical data in a CSV! – Gerardo Furtado Jan 29 '18 at 06:08
-
So my specific problem is there is folder present in sharepoint and i want to reflect the directory tree of that folder in d3 js collapisble tree. Any suggestions how should i proceed? – Tiru Jan 29 '18 at 06:43
-
Yes: use a JSON file. – Gerardo Furtado Jan 29 '18 at 07:25
1 Answers
3
D3.js doesn’t have built-in Excel file format parser. It does, however, have a CSV format data parser. You can save your worksheet as CSV and use the resulting text as a source for the D3.js visualization.

ctt
- 1,405
- 8
- 18

vaibhav pawar
- 81
- 1
- 7