SibSoft Ltd.
Development Services
software products
 RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
EZYWebhost - Cheap XUpload & XFileSharing 100% campatible hosting

AJAX upload progress bar

File sharing script
csv import format problems

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> CommuniMail
View previous topic :: View next topic  
Author Message
raylutz



Joined: 25 Oct 2007
Posts: 11

PostPosted: Oct 25, 2007 6:12 am    Post subject: csv import format problems Reply with quote

I can't seem to get the CSV import to work, and your documentation is very limited in that regard!

I have created a text file that has this contents:

NAME,EMAIL
T & Cricket,cabbt@cox.net
Jane Cruz,janeano@cox.net
Cynthia & Jeanette,cbvanz@msn.com
Susan & Nick,sdhc@cox.net

But it will not import. What is wrong?
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 22 Mar 2006
Posts: 126

PostPosted: Oct 25, 2007 6:59 am    Post subject: Re: csv import format problems Reply with quote

raylutz wrote:
I can't seem to get the CSV import to work, and your documentation is very limited in that regard!

I have created a text file that has this contents:

NAME,EMAIL
T & Cricket,cabbt@cox.net
Jane Cruz,janeano@cox.net
Cynthia & Jeanette,cbvanz@msn.com
Susan & Nick,sdhc@cox.net

But it will not import. What is wrong?



There are 2 reasons why your file cant be imported:

1. You should use full header set.
2. You should have all fields in there, even if they're blank

In other words, you shouldn't modify header and remove commas (fields separator) for fields which are blank.

HINT: In order to get sample import CSV file - you can use Export: just export existing contacts from system and take a look at format.


I hope that will help.
Thanks
Back to top
View user's profile Send private message Send e-mail
raylutz



Joined: 25 Oct 2007
Posts: 11

PostPosted: Oct 25, 2007 5:47 pm    Post subject: Work-around + Correction suggestion... Reply with quote

I did an export and I notice now that you have an extra comma at the end of every line

STATUS,EMAIL,EMAIL2,NAME,PREFIX,COMPANY,TITLE,ADDRESS,ADDRESS2,CITY,STATE,ZIP,COUNTRY,FAX,ADD_INFO1,ADD_INFO2,CREATED,

That's really not standard CSV format, which does not require the extra comma at the end.

I was able to get my short CSV file to work as long as I put the extra comma at the end.

In reviewing your code, I believe you need the comma because you do not remove the line termination characters, and then the field has those line termination characters during further processing, comparison, etc. You should probably check on that. Don't sell yourself short. The code is designed to allow the fields in any order and does NOT require that you have all the fields.

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> CommuniMail All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group