*! version 0.2 8Nov2023

help for metaxl extract

Title

metaxl extract - extracts metadata from data in memory

Syntax

metaxl extract
[, options]

Options
metafile(fn) sets the name of the Excel file where the metadata is saved. The
user should not provide the file extension. Defaults to metafile.xlsx.

chars extracts information about variables and data characteristics.
The default behavior is to not extract variables and data characteristics.

notes extracts information about data notes.
The default behavior is to not extract variables and data notes.

truncate truncates variables and value labels names if their length is
larger than 25 and 27 characters, respectively. This may become a problem because
the name of worksheets in Excel cannot exceed 30 characters.

replace replaces the meta file if it exists.

Description

metaxl extract is a Stata command that exports metadata from data in memory
to an Excel file. This file is organized in sheets.

The three first sheets are always exported, independently of the data set in memory.
The sheet data_features_gen contains general information about the
data set, namely file name, data label, variables used to sort the data, label
languages defined, notes and characteristics. The second sheet, data_features_spec,
displays information on number of observations, number of variables, data set size,
data signature and date of last change. A third sheet named variables presents
a table with information for each variable, namely variable name, label (for every
defined language), value labels (if they exist), type, format, notes and characteristics.

If the data set has characteristics, notes or value labels defined, then there will
be an additional sheet for each of them. There is one sheet per value label, note and
characteristic. For value labels, the name of the sheet is vl_name, where name
is the name of the value label. For notes and characteristics, the name of the sheet is
char/note_var, where var is the name of the variable to which the note or
characteristic applies.

Examples

Extract metadata from the auto data set and save it in meta_auto.xlsx.

. metaxl extract, meta(meta_auto)

Remarks

Please notice that this software is provided "as is", without warranty of any kind, whether
express, implied, or statutory, including, but not limited to, any warranty of merchantability
or fitness for a particular purpose or any warranty that the contents of the item will be error-free.
In no respect shall the author incur any liability for any damages, including, but limited to,
direct, indirect, special, or consequential damages arising out of, resulting from, or any way
connected to the use of the item, whether or not based upon warranty, contract, tort, or otherwise.

Dependencies

gtools package by Mauricio Bravo

Author

BPLIM, Banco de Portugal, Portugal.

Email: bplim@bportugal.pt

We appreciate your feedback. Comments are welcome!