Export employees from Org Chart for SharePoint and Microsoft Teams

Note

For the versions earlier than 4.x.x (including on-premises ones), please follow this instruction.

You may want to view all members of your organization in a spreadsheet format.

The best way to achieve this is to export a structured CSV file that can be opened in MS Excel, LibreOffice Calc, Google Sheets, Numbers for macOS, and similar applications.

How to export to CSV

Open a page that contains an Org Chart web part. In the upper-right corner, click the More menu and choose the Export to CSV option.

Export to CSV

You will see the following menu:

Export to CSV menu

You can configure the following settings:

  • Start from this person - select the manager who should appear at the top of the exported data. The resulting CSV will include this manager and all employees below them in the hierarchy.

If you leave this field blank, the root employee selected in the Configuration wizard will be used by default. Just start typing a name to get a list of suggestions:

Export to CSV
  • Levels to collect - specify how many levels below the selected manager should be included. The resulting CSV will contain employees up to the selected depth.

  • CSV delimiter - choose whether to use a semicolon or a comma as the field separator.

If you want to export all the members of your organization, just select the maximum number of levels. If you don’t know the exact number of levels in your organization, just enter a large number, for example, 1000.

How to export only specific fields to CSV

You can export only certain fields to a CSV file using a small JavaScript configuration.

Specify a custom array of fields in the Custom JavaScript section of Org Chart settings that will be used for the export to CSV. The current item level and subordinate count will be included in the result file automatically.

For example,

api.config.csvExportFields = ["ID", "Title", "Office", "JobTitle"];
CSV export fields

Note

If you use User Profiles data source, you need to specify the internal names of SharePoint user profile properties in the array. In case of SharePoint list data source specify the internal field names from the SharePoint list.

How to work with the data

Most spreadsheet editors automatically recognize and open CSV files. You can open the exported CSV file in any spreadsheet editor, such as MS Excel.

You will see a list of employees with all information from the Box template and the Tooltip template, along with several additional fields that may be useful for analysis:

  • AccountName contains the person’s SharePoint account. If a SharePoint list is used as the data source, this is typically the item ID or the field you mapped as the account identifier.

  • Manager contains the SharePoint account of the person’s manager. If a SharePoint list is used as the data source, this is typically the manager’s item ID or the mapped manager field.

  • PochLevelNumber contains the person’s level number starting from the root employee.

  • PochSubordinatesCount contains the total number of the person’s subordinates.

Export to CSV

For example, you can view and analyze the manager-to-employee ratio in your organization:

Export to CSV

You can also visualize your employees by level:

Export to CSV

Find more examples in this article.

Note

For a complete overview of exporting Org Chart in different formats and platforms, see this blog post. It applies to both SharePoint and Microsoft Teams.