# How to export the data inside a branch in a ttree to a txt file?

**URL:** <https://root-forum.cern.ch/t/how-to-export-the-data-inside-a-branch-in-a-ttree-to-a-txt-file/51399>\
**Category:** Newbie\
**Tags:** tree, hist, root\
**Created:** [August 30, 2022, 1:09pm UTC](https://root-forum.cern.ch/t/how-to-export-the-data-inside-a-branch-in-a-ttree-to-a-txt-file/51399 "2022-08-30T13:09:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [August 30, 2022, 2:24pm UTC](https://root-forum.cern.ch/t/how-to-export-the-data-inside-a-branch-in-a-ttree-to-a-txt-file/51399/5 "2022-08-30T14:24:49Z")

</div>

Also, [this post](https://root-forum.cern.ch/t/dump-ttree-in-a-txt-file/29069) explains how to do it with [TTree::Scan](https://root.cern/doc/master/classTTree.html#af8a886acab51b16d8ddbf65667c035e4).

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-export-the-data-inside-a-branch-in-a-ttree-to-a-txt-file/51399)._
