tsvtocsv(
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

- arrayfilter( -- processes each element of a text array or a data array with a formula (see Text Arrays and Data Arrays).
- csvexportline( -- generates a comma delimited line of data containing all the fields in the current record.
- csvexportlinevisiblecells( -- generates a comma delimited line of data containing all the visible (non hidden) fields in the current record.
- csvquoted( -- adds quotes if necessary for CSV text (RFC 4180).
- csvtotsv( -- converts comma separated text into tab separated text.
- databaseexportcsv -- exports selected records in the current database in CSV format (comma separated) to a text file.
- databaseexporttsv -- exports selected records in the current database in TSV format (tab separated) to a text file.
- databaseexportusingformula -- exports selected records in the current database to a text file, using a formula.
- downloadpartialdatabase -- downloads specified components of the current database from the server. The current database must be shared.
- export -- exports the selected rows in the current database into a text file.
- HTML Export -- custom exports into an HTML file.
- Import Database -- importing another database into the current database.
- import( -- returns a line or element of imported data. This function works in conjunction with repetitive operations like importtext, arrayfilter(, characterfilter( etc.
- importcell( -- returns one cell of imported data.
- importdatabase -- imports data from another database into the current database.
- importjson -- imports a JSON array into the current database.
- importjsonline -- imports a JSON record into the current record.
- importline -- imports a line of text into the current record.
- importrawdata -- imports raw binary data into an existing database.
- importtext -- imports text into an existing database.
- newdatabasewithtextfieldnames -- creates a new database from a text file. The text file must contain the field names in the first line.
- newdatabasewithtextfile -- creates a new database from a plain text file. The fields will be named A, B, C, etc.
- partialdatabaseupdate -- updates one or more components of an existing database.
- savepartialdatabase -- saves specified components of the current database, leaving other components out.
- seq( -- returns sequential numbers (1, 2, 3, etc.).
- Text Export -- exporting a database into a text or HTML file.
- Text Export Wizard -- custom exports into a text or HTML file.
- Text Import -- importing text into an existing database.
- tsvtojson( -- converts tab separated text into JSON formatted text.

History

Version | Status | Notes
10.2 | New | New in this version.