A beiginner question on Data format


I am very new to ROOT and will be using it as an End-User to analyze data. We have data from a baloon run and it is in Microsoft Excel format. Would it be possible to anlayze these data with ROOT? Can I convert it into ROOT data format?

Thanks so much.

Hi NT,
from excel, export your data in text format (save as, select .txt). See $ROOTSYS/tutorials/basic.C on how to read that file into a TNtuple.

Thanks, Axel.

I did export the file but could not open it. I had not looked at the tutorial earlier; will do that now. Thanks :slight_smile:. Sorry for asking a question that is already answered in the tutorials.


Look also at TTree::ReadFile


Will do. Thanks.

Hi NT,
I am attaching a few classes TTreeAscii, TBranchAscii, and TBranchBinary which allow one to interpret Ascii, CSV, XLS, etc files as ntuples without actually reading them into an ntuple. Excel files are parsed with the helper ‘xls2csv’ from the package ‘catdoc’, which I have included. TBranchBinary has been useful for analyzing large datastreams as ntuples in place, which were created before switching to ROOT.
For a simple test, do ‘make abba’. See also the comments in the example files ‘ascii.C’ and ‘branch.C’.
branch.tar.gz (234 KB)