Skip to content

Import

OrgChart React supports importing from CSV, XML, and JSON files.

CSV

javascript
menu: {
  importCSV: {
    text: "Import CSV", 
    icon: OrgChartJS.icon.csv(24, 24, 'red'), 
    onClick: () => chartRef.current?.importCSV() 
  }
},

XML

javascript
menu: {
  importXML: {
    text: "Import XML", 
    icon: OrgChartJS.icon.xml(24, 24, 'red'), 
    onClick: () => chartRef.current?.importXML()
  }
},

JSON

javascript
menu: {
  importJSON: {
    text: "Import JSON", 
    icon: OrgChartJS.icon.json(24, 24, 'red'), 
    onClick: () => chartRef.current?.importJSON()
  },
},

Demo

This is a demo for importing. You can export, edit the file, and then import it again.

Importing