Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

How can I export GraphQL API query results in i.e. Excel as a CSV?

Is there an easy way to export the data received so it can be used in Excel?

 

Thank you in advance!

1 Reply
Community Manager
Message 2 of 2

Re: How can I export GraphQL API query results in i.e. Excel as a CSV?

Unfortunately, not really. CSV is designed for tabular data, in other words it is designed for data formatted as columns and rows. JSON, the kind of data that GraphQL returns, is designed for hierarchical data, in other words it is designed for data formatted as a set of hierarchical, nested objects.

 

If you formatted your query very specifically, to only return flat rows, or if you post-processed the information you received to turn it from hierarchical data to tabular data, then you could convert it to CSV. But there's no simple way to take the result of any GraphQL query and convert it to CSV.

 

I hope that helps. Let us know if you have more questions.