# Unable to read the data from postman collection in newman

**URL:** <https://community.postman.com/t/unable-to-read-the-data-from-postman-collection-in-newman/57769>\
**Category:** Help Hub\
**Tags:** newman-project, collections\
**Created:** [February 17, 2024, 4:16pm UTC](https://community.postman.com/t/unable-to-read-the-data-from-postman-collection-in-newman/57769 "2024-02-17T16:16:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunar-module-astro15](https://avatars.discourse-cdn.com/v4/letter/l/f19dbf/32.png) [@lunar-module-astro15](https://community.postman.com/u/lunar-module-astro15)\
**Post date:** [February 17, 2024, 4:16pm UTC](https://community.postman.com/t/unable-to-read-the-data-from-postman-collection-in-newman/57769/1 "2024-02-17T16:16:50Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

I have a postman collection with all my tests written in the prerequest scriptin and i have set the data in the environment variable. I need to generate an excel/csv file with the data from this environment variable through newman.  
I am trying to read this environment variable using the .on(‘prerequest’) event in the newman.run() function but not able to get the data out of it. Any help is much appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [March 18, 2024, 4:17pm UTC](https://community.postman.com/t/unable-to-read-the-data-from-postman-collection-in-newman/57769/2 "2024-03-18T16:17:09Z")

</div>

Closed on March 18, 2024, 4:17pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
