Import of address data does not work
Categories
(Thunderbird :: Address Book, defect)
Tracking
(Not tracked)
People
(Reporter: joachim.holzhauer, Unassigned)
Details
Attachments
(9 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.188
Steps to reproduce:
Import CSV address data
Actual results:
Import CSV address data created from MS-Outlook does not work, all address entries created have no data.
The same happens when importing a vCard file.
Expected results:
I would like to get the requested data, otherwise Thunderbird cannot be used!!!!!
Comment 1•2 years ago
|
||
Please provide/attach a test case which includes no confidential data.
Steps to reproduce:
Import CSV address data
The 'Import CSV address data' is a collective for several steps and you would need to specifiy each step.
The image posted shows something was imported but it is blank.
I have seen this type of issue occur before in Support Forum and on those occasions, the data in the csv file column headers was not mapped correctly to the Thunderbird column headers. So, this would need to be rechecked first.
As you have a load of imported data which is all wrong, I would remove them from the Personal Address Book. There is no point in keeping a load of blank contacts.
- select one of the empty contacts
- then use 'Ctrl+A' to highlight all of them
- Right click on highlighted blank contacts and select 'Delete'
Do some preparation on csv file if necessary:
Thunderbird address book column headers have a first name and a last name, so do a check - if the csv file has a column header called 'Name' which contains both first and last name as one column, then I would recommend you open the .csv file and modify it. Create two new columns called 'First Name' and 'Last Name' and then get the correct data into each column.
Also, make sure there are no blank lines between any of the list of contacts in the csv file.
Save the file and start the import again.
I'm presuming you chose to 'Import' a 'CSV file' into the 'Personal Address Book'.
However, it is unlikely the csv file has the exact same column headers as used in Thunderbird even after you have created the column headers as mentioned previously.
This means you would have been prompted to map each column header in csv file to column headers used in Thunderbird.
I think this is where it all went wrong, so I'm asking you to check the next stage carefully.
Unfortunately, all the Thunderbird column headers are preselected by default, which means it's a real pain to select the correct column headers as they are not available in the drop down options - which appears blank.
Do this:
- Starting from the top work down and uncheck all the blue tick boxes which are wrong/incorrect mapping in order to disable all those selections
- then starting from the top work down again - reselect the blue tick box and then use the now available drop down to select the correct column header for the data being imported.
- Uncheck any blue tick box you are not importing.
Example:
'Source field' eg: 'First Name' has record 'John' allocated to use 'Address Book field' 'First Name'.
When completed all the fields, at the bottom click on 'Continue' button
Please report back on results,
| Reporter | ||
Comment 3•2 years ago
|
||
| Reporter | ||
Comment 4•2 years ago
|
||
| Reporter | ||
Comment 5•2 years ago
|
||
| Reporter | ||
Comment 6•2 years ago
|
||
| Reporter | ||
Comment 7•2 years ago
|
||
I download csv to check it out.
I do not have excel but opened it in OpenOffice Calc using separator options Tab and Comma
I advised you to make sure there were no empty lines, but there are empty lines in the second csv file. lines 2, 3,5,6,
Line 1 has column header
Line 4 and 7 contain a contact.
You need to remove those empty lines.
eg: outlook contact-01.csv file Joachim is a contact on line 4
StraBe geschaftlich is mapped to dienstlich :addresse
But you have no data in that field, so you end up with an empty space denoted by a space and comma.
However, you should not be seeing the space and comma.
In fact, it looks like all the address etc data has been inserted into one section like a string.
| Reporter | ||
Comment 9•2 years ago
|
||
| Reporter | ||
Comment 10•2 years ago
|
||
A CSV file exported from Microsoft Outlook holds the data not in one line, there can be several lines per item.
Items are organized like: "data","data",,,"","", item data can cross lines!
So when parsing these data, you must count the number of fields defined in the header in line 1:
"Anrede","Vorname","Weitere Vornamen","Nachname","Suffix","Firma","Abteilung","Position",........,"Webseite","Weiteres Postfach"
Thunderbird seems not to do this, it skips lines and assigns the data not to the requested fields.
I attach two CSV files, both not working correct, the field assignment at import is correct (see atached image).
Hope this will help for further investigations.
Kind regards Joachim Holzhauer
Senior Software engineer since over 40 years(In reply to Anje from comment #8)
I download csv to check it out.
I do not have excel but opened it in OpenOffice Calc using separator options Tab and Comma
I advised you to make sure there were no empty lines, but there are empty lines in the second csv file. lines 2, 3,5,6,
Line 1 has column header
Line 4 and 7 contain a contact.
You need to remove those empty lines.eg: outlook contact-01.csv file Joachim is a contact on line 4
StraBe geschaftlich is mapped to dienstlich :addresse
But you have no data in that field, so you end up with an empty space denoted by a space and comma.
However, you should not be seeing the space and comma.
- Why can you not handle empty lines, just ignore them!!!
- As I wrote before, data items can cross several lines when comment blocks are used.
- Items are organized like: "data","data",,,"","",
"data,"","data!" --> may need several lines - Skipping empty fields can be either like: "","","", or just ,,,,
- You must use only the comma as field separator, not the TAB character, this my be part of some comment data which should be not separated
- Why do you not query which field separator character is used before running the import?
- I also used LibreOffice 7.5 Calc to parse the files I sent, runs OK without any problem, why not Thunderbird?
I hope you can fix these problems, by the way, a vCard file also fails the import, I attach an example.
KInd regards Joachim
Comment 11•2 years ago
|
||
When I open you csv file using Notepad, I can see that everything displays with double quotes around every item and separated by commas.
When I open any of my csv files there are no quotes nor commas.
If I open your csv using OpenOffice calc, using separator options Tab and Comma and Test delimiter "
remove all empty lines.
Then save as text csv file keeping current format.
open that saved csv file using Notepad, all the quotes and commas have been removed.
Now tried import.
Did not select to import all the fields as I'm not entirely certain of german translate but I tried o match those you show in an image you posted.
Import shows results are ok.
So suggest you get the csv file altered as I've mentioned above - try using LibreOffice Calc
| Reporter | ||
Comment 12•2 years ago
|
||
| Reporter | ||
Comment 13•2 years ago
|
||
The CSV file which I'm using is created by Microsft Outlook.
-
It uses a Comma as field separator and packs each data item in double quotes, the reason for that is, that data items may cross several lines and may contain Tab characters, so do not use the Tab chracter as a field delimiter!!!!!
You can check for that when the header Line-1 is parsed (comma, double quotes):
"Anrede","Vorname","Weitere Vornamen","Nachname","Suffix","Firma","Abteilung","Position",........,"Webseite","Weiteres Postfach" -
You probably may query the user for this when starting your Import. See attached image from LibreOffice.
-
I must not alter the CSV file in any way when importing to LibreOffice Calc, it just works OK
-
I expect in Thunderbird that this should work there also, withhout any editing of a CSV file, if not, sorry, I must say this is a very bad programming!!! Not all users are software related and expect that a software runs OK as it is
| Reporter | ||
Comment 14•2 years ago
|
||
Hi,
here is some information about the CSV implementation as it should be. I wish good luck with the correct implementation.
https://datatracker.ietf.org/doc/html/rfc4180
https://www.creativyst.com/Doc/Articles/CSV/CSV01.shtml#EmbedBRs
https://edoceo.com/dev/csv-file-format
Greetings Joachim Holzhauer
Description
•