# How to export json or HTML datas to csv or excel

**URL:** <https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586>\
**Category:** Help Hub\
**Tags:** json, csv, export\
**Created:** [May 24, 2019, 11:47am UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586 "2019-05-24T11:47:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkateshm2280](https://avatars.discourse-cdn.com/v4/letter/v/258eb7/32.png) [@venkateshm2280](https://community.postman.com/u/venkateshm2280)\
**Post date:** [May 24, 2019, 11:47am UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/1 "2019-05-24T11:47:32Z")

</div>

I want to download json or html datas to csv or excel file, please help me…

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [May 24, 2019, 1:18pm UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/2 "2019-05-24T13:18:44Z")

</div>

Hey @venkateshm2280

Welcome to the community 👋

I’m unsure of what context you would need to do that in -

Are you able to provide more information around your current workflow and the data you are trying to download, please?

---

<div class="post-metadata">

**Author:** ![venkateshm2280](https://avatars.discourse-cdn.com/v4/letter/v/258eb7/32.png) [@venkateshm2280](https://community.postman.com/u/venkateshm2280)\
**Post date:** [May 24, 2019, 1:30pm UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/3 "2019-05-24T13:30:58Z")

</div>

![images](https://us1.discourse-cdn.com/getpostman/original/3X/0/1/01c1cb7d9d9177e87454c35a80f37690cbaa04da.png)

Thanks for your reply.  
I would like to download the Json datas in the attached image to Excel…

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [May 24, 2019, 2:10pm UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/4 "2019-05-24T14:10:50Z")

</div>

You’re not currently able to export the response data, in that format, from the features with in the app.

You could use the `Send and Download` option (The downdown option on the right side if the `Send` button) to save the response body data to a JSON file but not in a CSV.

Small projects have been created to utilise the `sendRequest()` function in the `Pre-request Scripts` to write the response data to a `.csv` file.

All the details for this can be found here:

> **[Write Responses To File](https://documenter.getpostman.com/view/3407886/RWgp1fB5?version=latest)**
>
> This collection makes it easy for users who want to write the response of each request to a file.
> This can be extended to write anything for eg. meta information or value of variables being used.
> 
> 
> This project is using a powerful feature built in...

This might not be exactly what you’re looking for but it might get you closer to a solution.

---

<div class="post-metadata">

**Author:** ![venkateshm2280](https://avatars.discourse-cdn.com/v4/letter/v/258eb7/32.png) [@venkateshm2280](https://community.postman.com/u/venkateshm2280)\
**Post date:** [May 28, 2019, 6:29am UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/5 "2019-05-28T06:29:58Z")

</div>

Sir,

Thanks for the information. Is there is any way to call post web service using PHP.

---

<div class="post-metadata">

**Author:** ![sfdcse](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sfdcse](https://community.postman.com/u/sfdcse)\
**Post date:** [August 16, 2021, 9:18pm UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/6 "2021-08-16T21:18:02Z")

</div>

I tried the “Write Responses to File” and the script.js option to change the file extension defaultFileExtension = ‘csv’, // Change the default file extension and it doesn’t seem to work even though I changed the file format and restarted the server and it is still outputting JSON files. Any ideas?

---

<div class="post-metadata">

**Author:** ![axelcast](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@axelcast](https://community.postman.com/u/axelcast)\
**Post date:** [February 9, 2023, 11:23pm UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/7 "2023-02-09T23:23:18Z")

</div>

Hello All,

Do you know if there is a way to export results to csv files?

Regards.

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [February 10, 2023, 10:32am UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/8 "2023-02-10T10:32:34Z")

</div>

@axelcast

The Postman sandbox does not have native access to the local file system.

It’s not what the tool was designed to do.

There are some work arounds, but they require you to have a local API ready to accept the data.

> **[Write to your local file system using a Postman Collection | Postman Blog](https://blog.postman.com/write-to-your-local-file-system-using-a-postman-collection/)**
>
> We’ve seen it’s super useful to use an inbound webhook to pipe information gathered by Postman to a Slack channel for scheduled...

If you use the Newman command line tool to run your tests, then this will generate a report that shows the test run and whatever failures you have.

[Running collections on the command line with Newman | Postman Learning Center](https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/)

There is a HTML extra library that gives more in-depth reports.

[newman-reporter-htmlextra - npm (npmjs.com)](https://www.npmjs.com/package/newman-reporter-htmlextra)

Combine Newman with your favourite CI (continuous integration) tool and you should be able to get your test results saved back to the CI tool. (For example, back into Azure Test Plan runs).

If you can’t create a local API to send your data to, consider using a Cloud based service like SharePoint which has its own API. Store your results in an array, and in the Tests tab of the last request, use sendRequest() to save the results to a SharePoint list via the SharePoint API.

If you really want to create CSV files within the local file system, consider a scripting language like PowerShell. You can use Invoke-Webrequest and Export-CSV to your hearts content. (This is how I would do this if it wasn’t directly related to testing, in which case I would use the CI tool to store the results).

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 10, 2023, 11:34am UTC](https://community.postman.com/t/how-to-export-json-or-html-datas-to-csv-or-excel/5586/9 "2023-02-10T11:34:09Z")

</div>

This reporter by @matt is also available to generate a CSV-based output from a Newman run:

> **[newman-reporter-csv](https://www.npmjs.com/package/newman-reporter-csv)**
>
> A CSV reporter for Newman.. Latest version: 1.3.0, last published: a year ago. Start using newman-reporter-csv in your project by running \`npm i newman-reporter-csv\`. There are 3 other projects in the npm registry using newman-reporter-csv.

CLI flags can be used to include the response body of the request, in a column:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/8/9/89aa0a635718cbbdf372337de958c9e83d9da435.png)
