Copy FoldingText outline as CSV or TSV for Excel etc

A script which copies the contents of the front FoldingText document to the clipboard in CSV or tab-delimited format.

( TSV can be pasted straight into Excel )

	One spreadsheet column for each level of outline indentation, and
	One spreadsheet column for each type of @key(value) tag in the document
	The key of @key(value) is used as the column heading, 
	and the value is placed in a spreadsheet cell.
	Excel automatically recognises yyyy-mm-dd
	and yyyy-mm-dd  hh:mm as datetime strings, and converts them accordingly.
        @due(2015-06-01 14:00) will become an excel date in a column with header 'Due'