toTabSeparated

fun toTabSeparated(includeHeader: Boolean = false): String(source)

Renders the selection as tab-separated text, which is what spreadsheets paste natively.

Values containing a tab, a newline, or a double quote are quoted and their quotes doubled, so a cell holding free-text notes cannot silently split one row into several on paste.

Parameters

includeHeader

Whether to lead with a row of column titles. Off by default, matching what a spreadsheet puts on the clipboard when you copy a range.