This is about File Headers.
Expected Behavior
When importing a .csv, while using file headers to denote e.g. notetype, Anki should recognize the file header and apply it accordingly and properly.
Also see the Workarounds chapter below.
Actual Behavior
Anki doesn’t recognize the file headers if they have been created via LibreOffice Calc, or interprets them incorrectly.
Steps to Reproduce
- Create a sample .csv in LibreOffice Calc and save it with field delimiter
,, String delimiter".
- Click Import in Anki.
- See that the notetype and deck are incorrect (but the field separator is correct):
Additional Info
#1
Anki asks to create a new Pineapple,, deck. That is due to the additional fields (Comma separated). Anki doesn’t recognize the actual Pineapple deck:
#2
The generated .csv looks like this:
#separator:Comma,,
#notetype:Cloze,,
#deck:Pineapple,,
Front,Back,Tags
Hello,World,Tags::Sub_Tags
#3
If the .csv was created with the Quote all fields option checked in LibreOffice, then you get the following generated file:
"#separator:Comma",,
"#notetype:Cloze",,
"#deck:Pineapple",,
"Front","Back","Tags"
"Hello","World","Tags::Sub_Tags"
In this case, the workaround provided below only works, if you remove the " from the lines starting with #. Also, with this quote option turned on, Anki no longer guesses the separator correctly; it falls back to Colon.
Workarounds
One could manually modify the .csv outside of LibreOffice like this:
#separator:Comma,,
#notetype:Cloze
#deck:Pineapple
Front,Back,Tags
Hello,World,Tags::Sub_Tags
Though this isn’t user friendly.
Affected versions
At least the following:
Current Stable
Anki 25.07.5 (7172b2d2) (ao)
Python 3.13.5 Qt 6.9.1 PyQt 6.9.1
Platform: Linux-6.12.38+deb13-amd64-x86_64-with-glibc2.41
Current Release Candidate
Anki 25.09rc1 (5c4d2e87) (ao)
Python 3.13.5 Qt 6.9.1 PyQt 6.9.1
Platform: Linux-6.12.19-amd64-x86_64-with-glibc2.41


