Page 1 of 1

[SOLVED]NMS: Importing users from a CSV file[SOLVED]

Posted: Mon Mar 26, 2007 1:51 pm
by reidjazz
[SOLVED]SO, any of you Mac users out there, make sure your line endings are UNIX!![SOLVED]

I'm running CMSMS 1.0.4 and NMS 1.0.1 on an Apache 2.0 server (php 4, mysql 4)

I'm having difficulty importing users from a CSV file. On the admin panel for import it states:
The import file must be in CSV (comma separated value) format, one entry per line. The first field should be an email address, the second field a username, and the third a list name
Here is a sample from the file I'm trying to import from:
conradjhall@gmail.com,Conrad Hall,Performance
where field 1 is the email address, field 2 is the person's name, and field 3 is the name of the list that they are a member of.

When I import the file, I get the following error message:
Error at line 1, no such list Performance Jan@lewisscheid.com
This person is the 2nd record in the file (not the first).

I've checked to make sure that the list name is correct, and that there are commas separating fields. I can't think of what might be the problem.

Any ideas are most appreciated!

Kind regards,
Todd Reid
reidjazz

Re: NMS: Importing users from a CSV file

Posted: Mon Mar 26, 2007 5:24 pm
by skypanther
Could it be a line-termination character problem? Win & *NIX platforms use different characters to mark the end of a line. The error message makes me think the module isn't seeing the line ending after Performance and is including the next email address.

Tim

Re: NMS: Importing users from a CSV file

Posted: Mon Mar 26, 2007 8:38 pm
by reidjazz
Tim,
Could be...

I'm on a Mac...the character at the end of each line is a soft break, not a hard break. It may be interpreting that such that everything is one record!

I'll let you know what I find out.

Thanks,
Todd

[SOLVED]Re: NMS: Importing users from a CSV file[SOLVED]

Posted: Mon Mar 26, 2007 8:42 pm
by reidjazz
Sure enough...changed the lined ending to a UNIX line ending and voila!!!

Thanks for pointing me in the right direction!! KUDOS for you

Todd

Re: [SOLVED]NMS: Importing users from a CSV file[SOLVED]

Posted: Sat Apr 07, 2007 9:49 pm
by Albryhno
I'm having the same problem with my csv file (line break not recognized), but don't know how to change the line ending to UNIX. Could someone tell me how that's done. In Excel, or another program maybe? Thanks

Re: [SOLVED]NMS: Importing users from a CSV file[SOLVED]

Posted: Mon Apr 09, 2007 3:57 pm
by skypanther
There are freeware and shareware utilities to convert. A google search turned up http://okapi.sourceforge.net/ I haven't used it or tried it but it might work.

Tim