6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/22/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#2742] Addressbook import fails with CSVs with newlines
*
Your Email Address
*
Spam protection
Enter the letters below:
.__.. ..___.. . __. | || | _/ |_/ (__ |__||/\|./__.| \.__)
Comment
> If a field in a CSV file to be imported contains newlines (even when > they're enclosed inside quote characters), Turba won't import that > row, and will generate a warning on the screen like so: > > > > Warning: Read wrong fields number count: '78' expected 92 in > /usr/local/www/mod_php/lib/php/PEAR.php on line 842 > > Warning: Read wrong fields number count: '1' expected 92 in > /usr/local/www/mod_php/lib/php/PEAR.php on line 842 > > Warning: Read wrong fields number count: '1' expected 92 in > /usr/local/www/mod_php/lib/php/PEAR.php on line 842 > > Warning: Read wrong fields number count: '3' expected 92 in > /usr/local/www/mod_php/lib/php/PEAR.php on line 842 > > > > In this case, the CSV is from an export of an Outlook 2003 "XP" > addressbook, and the 79th column (out of 92) is a "Notes" column > which happens to have some newlines in it. As you can see, it grabs > the first 78 columns and then tries to process each line of the > continued Notes field as a new addressbook entry. Looking at the > file itself, the entry snippet looks something like: > > > > ...... "foo","bar","baz","Here's > > some > > data: > > Saturday, September 21, 2002 11:02 PM > > etc","frob",..... > > > > As you can see, the newlines are enclosed inside the quote character > (which I had specified on the first screen of the address book > import). > > > > The most obvious response would, of course, be simply "Don't Do > That," but unfortunately Outlook apparently doesn't have any options > which would let you exclude the Notes field, or fields with newlines, > etc, and so fixing the file from the user's perspective becomes a > matter of opening the file in a spreadsheet app and pruning out > troublesome columns, which simply isn't something you could ask of a > larger, fairly computer-illiterate userbase. > > > > I'll see if I can look at patching it up myself in a bit, figured I'd > put this here for posterity now though. Thanks! > > > > -CJ
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers