How to export Agilent ChemStation .D data to CSV

An Agilent .D folder is not one file but a set of binary files, one per detector signal. To get the numbers into Excel, Origin, Python or R you need to decode those files. Three ways to do it, from quickest to most scriptable.

What is inside a .D folder

FileContains
DAD1A.ch, VWD1A.chOne UV channel at a set wavelength (the signal name holds it, e.g. Sig=254,4)
FID1A.chA GC flame ionization detector signal, usually in pA
ADC1A.chAn analog input, typically CAD or ELSD
DAD1.UVFull diode-array spectra: absorbance at every wavelength, at every time point
data.ms, MSD1.MSMass spectra from a single-quadrupole MS, scan or SIM

The rest of the folder (ACQ.M, RUN.LOG, SAMPLE.XML) holds the method, the run log and sample information.

Option 1: in your browser, no install

  1. Open Nagura Lab and drop the whole .D folder on the page (or several folders at once).
  2. Tick the signals you want. Runs overlay on one chart, so you can compare injections directly.
  3. Press Download CSV. The file has a time column in minutes and one column per signal, with units in the header.

The files are decoded on your own computer. Nothing is uploaded, which matters for confidential or unpublished data.

Option 2: from ChemStation or OpenLab itself

If you have the software on a licensed PC, the signal can be exported from data analysis. Menu names differ between ChemStation revisions. For OpenLab CDS 2.4 and later, Agilent describes the steps in Export Chromatogram Signal as CSV.

Option 3: in Python, with rainbow

The open-source rainbow library reads the same files. It is what Nagura Lab's decoders are tested against.

pip install rainbow-api

import rainbow as rb

run = rb.read("sample.D")
print([f.name for f in run.datafiles])          # e.g. ['DAD1A.ch', 'DAD1.UV']
run.get_file("DAD1A.ch").export_csv("DAD1A.csv")

For R there is chromConverter, which wraps several of these parsers.

Common problems