trouble importing csv/txt files (Import window does not appear)
Up one level
trouble importing csv/txt files (Import window does not appear)
http://www.lat-mpi.eu/tools/elan/manual/ch04s02s21.html
seem clear enough, but I am unable to get the second dialog window (Import) to appear after choosing a comma- or tab-delimited files containing data generated in Excel. Are there any formatting requirements for this? The instructions indicate there are not, but a simple text file containing the letter "a" does not have this problem.
I'm using ELAN v3.9.0 and Excel 2003 on Windows 7 Ultimate x64
Re: trouble importing csv/txt files (Import window does not appear)
a,b,c,d,eunless a character of some kind is added to one (just one) of the rows. Perhaps it gets confused by the header row or is treating consecutive delimiters as one or something, but if you force it to be 5x5 with dummy characters (even spaces are ok) then it works.
1,2,3,4,
1,2,,4,5
1,2,3,4,,
Re: trouble importing csv/txt files (Import window does not appear)
- fill in any blank cells in the Excel file with a character (I used dashes instead of spaces so I could see them),
- save the file as a tab-delimited text file (note: csv files don't work well for importing transcripts since they may contain commas in the text, which prevent ELAN from parsing the file correctly due to the above-mentioned problem),
- import the tab-delimited text file into ELAN per the manual (hey the 2nd approach, which automatically sorts the annotations into separate tiers based on column sure is handy - kudos to the developer!),
- go through and delete all the superfluous annotations containing a dash (to speed this up a little, use alt + left-click to select multiple annotations, then right-click and choose "Delete Selected Annotations").
Now that I've gone through all that, will someone tell me there's an easier way to import a transcript?
Re: Re: trouble importing csv/txt files (Import window does not appear)
Hi, in theory it should not be a problem to have "," in the content and still use comma separated text. See this example with three columns and five rows:
a,b,c
1,,3
"Hello world", "One, two, three","You can say ""Yes"" to CSV"
one,two,
left,middle,"right"
Note how separators are allowed inside quoted strings and how quotes are escaped by doubling them. This is the standard way to escape things in CSV. Of course tab, comma and semicolon should all be allowed as separators, but the user needs a chance to say which separator is used, in case a possible autodetection fails.
Re: Re: trouble importing csv/txt files (Import window does not appear)
It appears that there is indeed a bug in the first part of the import, where the delimiter and the number of columns are detected and a window is created showing a sample of the file. The function that is used to detect the number of columns uses deprecated methods that fail when there are empty cells.
This will be fixed in the next release. Until then you can stick to the workaround that you describe, be it that you only have to make sure that the first 10 rows don't contain empty cells.
-Han