tsvtocsv(
CSVTEXT
)

The tsvtocsv( function converts tab separated text into comma separated text.


Parameters

This function has one parameter:

csvtext – text containing comma separated values.


Description

This function converts tab separated text into a comma separated text array. For example, suppose you have a tab file named Directory.tsv that contains data like this:

Adams, Dorothy ▸ 555-3000 ▸ dadams@gmail.com
Franklin, Mark ▸ 555-4822 ▸ mfranklin@hotmail.com
Smith, John ▸ 555-1212 ▸ jsmith@yahoo.com
Wilson, Judy ▸ 555-9324 ▸ jwilson@acme.net

This data can be read into a variable and converted to comma separated format:

local phoneNumbers
phoneNumbers=tsvtocsv(fileload("Directory.tsv"))

The phoneNumbers variable now contains the same data, but separated by commas instead of tabs. If any cells contain commas, they will be quoted.

"Adams, Dorothy",555-3000,dadams@gmail.com
"Franklin, Mark",555-4822,mfranklin@hotmail.com
"Smith, John",555-1212,jsmith@yahoo.com
"Wilson, Judy",555-9324,jwilson@acme.net

See Also


History

VersionStatusNotes
10.2NewNew in this version.