Export GridContainer to Excel

We use the Aras treegridcontainer to construct data in a custom UI. Is there an inbuilt API that will enable to export the data that is displayed in the treegrid UI  to excel. Any inputs related to this will be helpful