These two new PopupMenu system commands are used export the contents of the tree to a delimited file:
$EXPCSV
$EXPTSV
The first exports the tree to CSV, the second to a tab delimited file (i.e. Tab Separated Values). To automatically open the file after exporting (i.e. to launch your registered spreadsheet program), append "+" to the $EXPCSV or $EXPTSV options, e.g.:
$EXPCSV+
$EXPTSV+
As an alternative to adding explicit export options to each XTREE, you can enable them globally by adding one or both of the following to the miame.ini:
SBR=XTREE_EXPCSV
SBR=XTREE_EXPTSV
To globally set the option to launch after exporting, add the following:
SBR=XTREE_EXPOPEN
The text for these automatically-added context menu options will be taken from SYS:SBRMSG.xxx lines 026,001 and 026,002, which default to the following (for the English version):
026,001,Export (CSV)
026,002,Export (Tab Delimited)
So the above three SBR= commands would be equivalent to adding the following PopupMenu clause to the zero column of each tree:
"PopupMenu=Export (CSV),$EXPCSV+;Export (Tab Delimited),$EXPTSV+"
Note that whenever a PopupMenu option containing a command string starting with "$EXP" appears explicitly in an XTREE definition, the corresponding global options will be ignored for that tree. (This allows you to customize the global option in particular cases and eliminates the problem of redundant menu options in programs where you already implemented the option explicitly.)
You can also disable the global option by adding a dummy PopupMenu item with a "-" in front of the $EXP... command, e.g.
"PopupMenu=xxx,-$EXPCSV"
The description field ("xxx" in the above example) is ignored (since the whole point of the "-$EXPCSV" is to remove the corresponding item from menu).