In DEVONthink 3.9.4 I have the attached sheet document (CSV file zipped for upload).
-
When I view the document it does not show the original order, even not intially without any reordering done.
-
Also, the first line is not used as header.
How can I fix these issues?
Bildverwaltungsprogramme-Table.zip (2.1 KB)
PS: I am aware of How to return to original order of sheet records? - DEVONthink To Go / Tips - DEVONtechnologies Community, but this here seems different, because the original order is never used.
Just Option-click on the header of the column currently used for sorting to reset the sorting.
Just Option-click on the header of the column currently used for sorting to reset the sorting.
This works. Thanks. However, the first time I select (i.e. load) the sheet it never has the default order. Why’s that? (Seems to happen only with this document.)
Regarding the other item: Why doesn’t DEVONthink show the header row as headers? See this screenshot:
Look at the source CSV. I suspect there is no “header” row in your file. Do an Interweb search for “csv header” and you’ll see how that needs to be done.
No header row? There certainly is a header row. Look at the CSV file in question. (In the screen shot the sheet is already re-sorted away from the default order with the header row at the top.)
I don’t normally unzip attached files. I did a test with
Header,Heading1,Heading 2,,,,
a,1,5,,,,
b,2,5,,,,
c,3,5,,,,
d,3,5,,,,
And I see what you mean that the header row is not kept at top and “A”, “B”, is retained. Frankly, never noticed that. May be a setting somewhere. CSV is a relatively simple format intended for data transfer not visualisation, unlike a spreadsheet or document that accommodates a row header.
1 Like
CSV might or might not contain a header, DEVONthink tries to automatically detect this but this might fail.
2 Likes
Yea, as I understand (I of course could be wrong) there is nothing in CSV spec to say “this is the header” other than to put it in the first row.
Can see this when importing CSV into a spreadsheet, the dialog box asks user if there is a header row or not, as the format doesn’t define it.
As I mentioned, unlike other more sophisticated data formats.
And the above file is a bit unusual as the header is in the first column, not the first row.
That would be wonderful! Any input, @cgrunenberg?
I somewhat agree. But CSVs are still a good plaintext format for tables. Plus DEVONtechnologies has taken CSVs/TSVs thankfully into its set of displayed documents.
And the above file is a bit unusual as the header is in the first column, not the first row.
No, no the first row is the header row with the columns:
Produkt,Excire Foto 2024 (3.0),Lightroom Classic CC 13.0 ,ON1 Photo Raw 2024 (18.0),PhotoDirector 2024 (15.0),Photo Supreme 2023
So I expect the thing to look somewhat like this:
Produkt |
Excire Foto 2024 (3.0) |
Lightroom Classic CC 13.0 |
ON1 Photo Raw 2024 (18.0) |
PhotoDirector 2024 (15.0) |
Photo Supreme 2023 |
Hersteller, URL |
Pattern Recognition Company, excire.com |
Adobe, adobe.com/de |
ON1, on1.com |
CyberLink, de.cyberlink.com |
IDimager, idimager.com |
Systemanforderungen |
Windows ab 10 (64 Bit), macOS ab 10.14 |
Windows ab 10 (64 Bit), macOS ab 12.0 |
Windows ab 10 (64 Bit), macOS ab 11.0 |
Windows ab 10, macOS ab 10.15 |
Windows ab 7, macOS ab 10.12 |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
There is not even a spec for CSV, as RFC 4180 correctly states 
And it also says:
There maybe an optional header line appearing as the first line of the file with the same format as normal record lines.
And it very clearly does not say how to determine that the first line of a file is the header, as the “names” there might well simple “fields” as in any other row.
Interesting concept of “header” here, I’d say. For me, at least, “Excire” does not fit the bill of a header for “Windows ab 10” etc. (while “Systemanforderungen” does).
Maybe pivoting the CSV gives you a better result in DT?
1 Like
Usually the first row defines the columns (and their type) but in this case this information is found in the first column. And therefore e.g. form view looks like a mess. The structure is definitely not one that DEVONthink expects.
1 Like
And therefore e.g. form view looks like a mess.
The form view only looks like a mess because DEVONthink does not accept the header row. If we use the first line as header the form view looks pretty sensible to me:
|
Systemanforderungen |
Excire Foto 2024 (3.0) |
Windows ab 10 (64 Bit), macOS ab 10.14 |
Lightroom Classic CC 13.0 |
Windows ab 10 (64 Bit), macOS ab 12.0 |
ON1 Photo Raw 2024 (18.0) |
Windows ab 10 (64 Bit), macOS ab 11.0 |
PhotoDirector 2024 (15.0) |
Windows ab 10, macOS ab 10.15 |
Photo Supreme 2023 |
Windows ab 7, macOS ab 10.12 |
It’s the record of system requirements for a given number of applications.
In any case, DEVONthink seem to some magic with CSVs (sometimes it takes the first row as header and sometimes it does not).
@cgrunenberg Can we know how the magic works, or even better: Can we overwrite the magic?
This is not a screenshot of DEVONthink’s form view, this looks like sheet view but it’s not the CSV from your first post. Do you still use the same data?
It’s not customizable.
You can force DT to recognise the first row as a header row by adding #text to the end of each column header before the comma.
1 Like
What you show then, is using the first column as header. CSV simply does not cater for row headers. Not a DT matter at all.
That’s fantastic! This helps a lot! Thank you! That’s what I meant with customisable.
@NickLowe How do you know this gem? Did I miss it in the doco?
When you create or edit a Sheet using DT’s own editor, you have the option to specify a field type for each column, which is written into the .csv header in the form #-type. This is DT’s way of working around the limitations of the .csv format so that it can use field types, which .csv of course doesn’t support on its own. It can sometimes be a small inconvenience when you want to import a Sheet into a database and you have to remember to strip the #-strings from the headers, but it does have the advantage that DT will then always know that it’s a header row.
3 Likes
Where did this CSV file originate?