Opening and Exporting .dat and .dht files

I hava a dataset created in Gauss which is divided in 3 files R.1, TT1.DAT, TT1.DHT.

How can I open it and export it into Excel or .cvs format so that Gauss recognizes that it is from the same dataset?


Thanks for you help.

1 Answer


The most current GAUSS dataset format holds everything in a single .dat file. The previous generation GAUSS dataset held the data in the .dat file and the header names in the .dht file.

You can load the data from TT1.DAT with the loadd command and you can load the headers with getheaders like this:

data = loadd("TT1.DAT");

var_names = getheaders("TT1.DAT");

Now that you have this data in GAUSS, you can create a dataset in a new format with the saved command like this:

// Save data in a GAUSS dataset
saved(data, "TT1.DAT", var_names);

// Save data in a CSV file
saved(data, "TT1.csv", var_names);

// Save data in an Excel file
saved(data, "TT1.xlsx", var_names);

The last two variations require GAUSS version 19. If you have an older version of GAUSS, you can write the data to Excel with the xlsWrite function.

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy