# CSV format of Sheets

**URL:** <https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672>\
**Category:** Feedback\
**Created:** [September 19, 2026, 3:17am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672 "2026-09-19T03:17:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![halloleo](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/halloleo/32/28940_2.png) [@halloleo](https://discourse.devontechnologies.com/u/halloleo)\
**Post date:** [September 19, 2026, 3:17am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/1 "2026-09-19T03:17:06Z")

</div>

Sheets created in DEVONthink have by default a _semicolon_-separated-value file underneath.

Is there a way to say use _comma_-separated-value (CSV) format

---

<div class="post-metadata">

**Author:** ![stratadata](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/stratadata/32/35651_2.png) [@stratadata](https://discourse.devontechnologies.com/u/stratadata)\
**Post date:** [September 19, 2026, 7:19am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/2 "2026-09-19T07:19:56Z")

</div>

I see tab-separated, quote-enclosed fields in a file with a “.tsv” extension when I create a Sheet…

However, I _ **do** _ see tabular data when I click on a .csv, which is a really nice touch!

Sean

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [September 19, 2026, 8:31am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/3 "2026-09-19T08:31:01Z")

</div>

Since S-CSV, CSV, and TSV are all simple text files, it is certainly possible to replace one separator by another. Though it might need some careful thinking to avoid replacing the separator inside strings.

---

<div class="post-metadata">

**Author:** ![stratadata](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/stratadata/32/35651_2.png) [@stratadata](https://discourse.devontechnologies.com/u/stratadata)\
**Post date:** [September 20, 2026, 1:53am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/4 "2026-09-20T01:53:30Z")

</div>

Which is why the .tsv files have fields which are quote-enclosed.

I think .csv files are encoded so fields/cells which need it are enclosed, usually.

Maybe the Sheet .ttsv files are just blanket encoded that way to simplify coding, I’ve not explored either formats extensivly in DT4.

Sean

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [September 20, 2026, 9:44am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/5 "2026-09-20T09:44:11Z")

</div>

> [@halloleo](#):
>
> Sheets created in DEVONthink have by default a _semicolon_-separated-value file underneath.

What makes you say that? Taking a look at the raw content of a TSV file gives me, for example, this:

```plaintext
"1. Spalte#real{format:currency}"	"2. Spalte#string"
"10"	"Preis für 2. Produkt ""Blub"""
"500"	"Preis für 1. Produkt"

```

Not a single semicolon in view. It really _is_ a tab separated file, with every field enclosed in double quotes (needlessly, imo), and quotes in a field themselfes duplicated. Are you perhaps looking at a C-SSV file that you imported into DT?

To your question whether you can convert that to a CSV: Yes, you can. Something like this should do. (Disclaimer: I stole [some of the code](https://www.importcsv.com/blog/csv-escape-characters) shamelessly from a HI)

```javascript
(() => {
  const app = Application("DEVONthink");
  const r = app.getRecordWithUuid('x-devonthink-item://AF4EA610-05BB-47DB-B57D-2512D28AB659');
  const separator = ",";
  /* Get the column headings and remove the formatting information from them */
  const columnHeadings = r.columns().map(t => t.replace(/#.*$/,''));

  /* csvData will contain the data rows separated by "separator", with the colum headings in the first row */
  const csvData = [];
  csvData.push(columnHeadings.join(separator));

  /* Now loop over all rows */
  r.cells().forEach(row => {
    const csvRow = row.map(value => {

        /* Loop over all cells in this row. If it contains a comma, quote or a line separator, 
           double all quotes in it and then enclose it in quotes. */
        if(/[,"\r\n]/.test(value)) {
          return `"${value.replace(/"/g, '""')}"`;
        } else {
          return value;
        }
    })
    /* csvRow is an array of possibly quoted values. `join` creates a string from
        it with `separator` between each value. `push` appends it to the `csvData` array */
    csvData.push(csvRow.join(separator));
  })
  /* Create a string containg CSV data by joining all CSV rows with a newline */
  const csvText = csvData.join('\n');

  /* Do whatever you want with the CSV text here. You could write it to an external file or try to create a DT record from it. */
})()

```

---

<div class="post-metadata">

**Author:** ![halloleo](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/halloleo/32/28940_2.png) [@halloleo](https://discourse.devontechnologies.com/u/halloleo)\
**Post date:** [September 21, 2026, 3:17am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/6 "2026-09-21T03:17:23Z")

</div>

> [@chrillek](#):
>
> > [@halloleo](#):
> >
> > Sheets created in DEVONthink have by default a _semicolon_-separated-value file underneath.
> 
> What makes you say that?

I looked with a text editor at the underlying file of my sheet - and it is definitely a semicolon-separated-value file.

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [September 21, 2026, 3:27am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/7 "2026-09-21T03:27:27Z")

</div>

What _“text editor”_ ? `.tsv` files are delimited by tabs.

---

<div class="post-metadata">

**Author:** ![halloleo](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/halloleo/32/28940_2.png) [@halloleo](https://discourse.devontechnologies.com/u/halloleo)\
**Post date:** [September 21, 2026, 3:58am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/8 "2026-09-21T03:58:07Z")

</div>

> [@BLUEFROG](#):
>
> What _“text editor”_ ? `.tsv` files are delimited by tabs.

TextEdit.app

> [@BLUEFROG](#):
>
> `.tsv` files are delimited by tabs.

My file has the ending `.csv`. However the content is \ ***not** _comma_-separated, but _semicolon_-separated.

When does DEVONthink create sheets as semicolon-separated “csv” files?

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [September 21, 2026, 7:20am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/9 "2026-09-21T07:20:10Z")

</div>

When you _create_ them in DT. And then the extension is tsv.

If you import a,say, CSV into DT, it apparently keeps the original delimiters. DT never changes what you import.

That’s why I asked you if that where perhaps an imported file.

---

<div class="post-metadata">

**Author:** ![halloleo](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/halloleo/32/28940_2.png) [@halloleo](https://discourse.devontechnologies.com/u/halloleo)\
**Post date:** [September 21, 2026, 12:38pm UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/10 "2026-09-21T12:38:13Z")

</div>

> [@chrillek](#):
>
> When you _create_ them in DT. And then the extension is tsv.

I am very sure that I initially created the sheet in DEVONthink (and it is semicolon-separated) – but that’s a few DEVONthink versions ago…

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [September 21, 2026, 2:25pm UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/11 "2026-09-21T14:25:53Z")

</div>

> [@halloleo](#):
>
> When does DEVONthink create sheets as semicolon-separated “csv” files?

It doesn’t natively. Sheets are always tab-delimited `.tsv` files.

---

<div class="post-metadata">

**Author:** ![NickLowe](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/nicklowe/32/38937_2.png) [@NickLowe](https://discourse.devontechnologies.com/u/NickLowe)\
**Post date:** [September 26, 2026, 10:59am UTC](https://discourse.devontechnologies.com/t/csv-format-of-sheets/87672/12 "2026-09-26T10:59:51Z")

</div>

If, however, you open a comma-separated file not created in DT as a Sheet and edit a column type (e.g. from Multi-line Text, which is the default type, to Single-line Text), it will convert the whole Sheet to semicolon-separated.

Before:

```auto
column 1,column 2
item 1,item 2

```

After:

```auto
"column 1#string";"column 2#text"
"item 1";"item 2"

```
