# How to save String from json response to excel or csv file?

**URL:** <https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [August 24, 2020, 12:01pm UTC](https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265 "2020-08-24T12:01:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhammad01](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@muhammad01](https://community.postman.com/u/muhammad01)\
**Post date:** [August 24, 2020, 12:01pm UTC](https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265/1 "2020-08-24T12:01:22Z")

</div>

Hello Everyone Here,

I am facing an issue related to saving String value from response body directly to csv file, actually I don’t know how to write a specific value from response body to csv/excel directly.

My test script reads values from csv file and then compare with values in response body. Now I want to save some required string/int/any format values from response body and save directly in the same csv file/or in another sheet of same file.

I can save required info into global/environmental variable and then export it but issue is same script will execute multiple time for different data as per iteration. lets say same script run three time, variable will have result of last iteration but I want to save required string of each iteration either in variable or csv file.

I found this but it doesn’t help me  
[https://documenter.getpostman.com/view/3407886/RWgp1fB5?version=latest#f0f97744-0413-4bcf-b4e4-7c85939c5a7f](https://documenter.getpostman.com/view/3407886/RWgp1fB5?version=latest#f0f97744-0413-4bcf-b4e4-7c85939c5a7f).

Any help or guidelines highly appreciated.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [August 27, 2020, 1:22pm UTC](https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265/2 "2020-08-27T13:22:28Z")

</div>

You can’t just write to a CSV file from Postman.

The only approach would be using Node.js and Newman, with something like this:

> **[Postman: How to Write Files to Disk?](https://medium.com/apis-with-valentine/postman-how-to-write-files-to-disk-5ee398624a42)**
>
> Sooner or later you will ask yourself the question: how can a read or write files to disk when using Postman?

---

<div class="post-metadata">

**Author:** ![muhammad01](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@muhammad01](https://community.postman.com/u/muhammad01)\
**Post date:** [October 1, 2020, 10:39am UTC](https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265/3 "2020-10-01T10:39:43Z")

</div>

Thank you @vdespa.

Is there a way to change ‘iteration 1, iteration 2 …’ into some meaningful name ? ![iterationNameChange](https://us1.discourse-cdn.com/getpostman/original/3X/c/3/c394bf3e8951761962128b6db1446446c2908dac.png)

---

<div class="post-metadata">

**Author:** ![muhammad01](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@muhammad01](https://community.postman.com/u/muhammad01)\
**Post date:** [October 1, 2020, 12:19pm UTC](https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265/4 "2020-10-01T12:19:21Z")

</div>

or May be to change request Name. like

 ![requstName](https://us1.discourse-cdn.com/getpostman/original/3X/6/c/6cf5ee3d0887499b352025100f300b968c994ca4.png)

---

<div class="post-metadata">

**Author:** ![gpub1](https://avatars.discourse-cdn.com/v4/letter/g/f6c823/32.png) [@gpub1](https://community.postman.com/u/gpub1)\
**Post date:** [October 1, 2020, 6:22pm UTC](https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265/5 "2020-10-01T18:22:03Z")

</div>

with regards to saving string from Json respsone, Pls share the Json response  
If you want to save your test suite in csv you need node.js as told by vdespa

Saving your reporte in csv (this may help)

> **[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.

Let me know what your need is.  
Thanks

---

<div class="post-metadata">

**Author:** ![gpub1](https://avatars.discourse-cdn.com/v4/letter/g/f6c823/32.png) [@gpub1](https://community.postman.com/u/gpub1)\
**Post date:** [October 1, 2020, 6:23pm UTC](https://community.postman.com/t/how-to-save-string-from-json-response-to-excel-or-csv-file/15265/6 "2020-10-01T18:23:37Z")

</div>

You can go to Left panel in collection\> Go to request\> right Click and select Rename. This will solve your purpose
