2

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?

4
  • 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. Commented Jan 29, 2018 at 6:06
  • On top of that, a tree layout uses hierarchical data... good luck encoding the hierarchical data in a CSV! Commented Jan 29, 2018 at 6: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? Commented Jan 29, 2018 at 6:43
  • Yes: use a JSON file. Commented Jan 29, 2018 at 7:25

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.