Title: [Plugin: Import Users from CSV] Error when importing example file
Last modified: August 20, 2016

---

# [Plugin: Import Users from CSV] Error when importing example file

 *  Resolved [Mirte](https://wordpress.org/support/users/mirte/)
 * (@mirte)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/)
 * This sounds like the perfect plugin, unfortunately, it’s not working for me.
   
   I’m using the latest version of WordPress and BuddyPress and version 0.3 of this
   plugin.
 * When importing the example import.csv file, I get this error:
 * > Warning: Invalid argument supplied for foreach() in /mnt/webe/b2/16/52174216/
   > htdocs/wp/wp-content/plugins/import-users-from-csv/import-users-from-csv.php
   > on line 114
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /mnt/webe/b2/16/52174216/htdocs/wp/wp-content/plugins/import-users-
   > from-csv/import-users-from-csv.php:114) in /mnt/webe/b2/16/52174216/htdocs/
   > wp/wp-includes/pluggable.php on line 866
 * Also, when importing my own CSV file, using the tags from the example file, I
   get no error but no new users either. I think this has something to do with the
   fact that Excel saves CSV files differently in Europe, separating lines with 
   a semi colon instead of a comma. I already had a look in import-users-from-csv.
   php, but couldn’t find anything that I could change into semi colon. Care to 
   help me out?
    Thanks!
 * [http://wordpress.org/extend/plugins/import-users-from-csv/](http://wordpress.org/extend/plugins/import-users-from-csv/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/page/2/?output_format=md)

 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469557)
 * You can use the following solution:
 * – Close Excel
    – Click Start – Click Settings – Click Control Panel – Click Regional
   and Language Options – Click on Customize – Make sure the “Decimal symbol” is
   a period and change it to that if not – If the “List separator” is a semicolon(;)
   then change it to a comma – Run Excel and save the file as a CSV file
 * Source: [http://answers.google.com/answers/threadview/id/555457.html](http://answers.google.com/answers/threadview/id/555457.html)
 * Or you can change line 80 in the plugin file from `$rows[] = fgetcsv( $file_handle,
   1024 );` to `$rows[] = fgetcsv( $file_handle, 1024, ';' );`.
 *  [thesalmon](https://wordpress.org/support/users/thesalmon/)
 * (@thesalmon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469707)
 * I’m getting that same error, and I confirmed my language settings are set to 
   use . and , for decimal and list separator. I wonder if it has something to do
   with the fact that I first tried to import CSV files with incorrect header labels.
   Before I looked at your sample file, I tried to import a CSV with headers like,“
   login” “First Name”, etc. and got an error. Now I get that error, but the users
   are successfully imported anyway.
 * Thanks for a great plugin, but it would be great if I could get rid of that error
   message.
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469711)
 * Thanks for your feedback [@thesalmon](https://wordpress.org/support/users/thesalmon/).
   It will be fixed in the next version.
 *  [thesalmon](https://wordpress.org/support/users/thesalmon/)
 * (@thesalmon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469712)
 * You’re welcome. Great plug in! After reading the threads to understand how it
   works, I was able to look up the meta labels for a custom registration form I
   built using the WP-Members plugin, and now when I put that custom meta data in
   my csv it all imports beautifully. Thank you.
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469719)
 * I’m getting exactly the same error as [@mirte](https://wordpress.org/support/users/mirte/).
   I’ve tried importing the import.csv file that came with the plugin which is comma
   separated but I get the same error. It appears to import those two users but 
   then I tried to import a csv file based on exactly the same content as the test
   csv file and whilst I don’t get an error I also do not get any users imported.
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469720)
 * Arhh, hold on. I’ve figured out the issue I was having. On a Mac you need to 
   save as a “Windows Comma Separated” file and not the standard CSV file. Just 
   tried that and it imports and sends the user email correctly.
 *  [thesalmon](https://wordpress.org/support/users/thesalmon/)
 * (@thesalmon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469730)
 * To follow up on an earlier post…everything imports beautifully **IF** you have
   no commas in your questions and the user doesn’t use any commas or hard returns
   in their responses. The commas in my questions and the responses are adding to
   the COMMA separated data so the import gets very messy.
 * Is there a way to export the data tab separated instead of comma separated? Thanks.
 *  [thesalmon](https://wordpress.org/support/users/thesalmon/)
 * (@thesalmon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469731)
 * I solved it. Thanks for the well commented code. In the wp-members-export file
   I changed all the commas to semi-colons and then using Ulrich’s directions above,
   I set my list separator to a semi-colon. The data opens up in Excel looking good
   now! (but I still need my users to NOT use hard return in text boxes!)
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469732)
 * [@thesalmon](https://wordpress.org/support/users/thesalmon/), I think if there
   are double quotes around each field (as in the example file) or at least the 
   ones with the hard returns, hard returns will not affect the import.
 *  [thelaw](https://wordpress.org/support/users/thelaw/)
 * (@thelaw)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469735)
 * Unfortunately with 3.3.1 I can’t even get the sample file to import. I have tried
   everything, even just using a plain text editor to make sure the files are in
   the right format. I get the same invalid argument error. Cannot figure this one
   out as I’m even using the same file. I kept it as is and also edited out the 
   last two fields properly, no luck. Must be something small that is a problem.
 *  [nuttynuts](https://wordpress.org/support/users/nuttynuts/)
 * (@nuttynuts)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469736)
 * [@thelaw](https://wordpress.org/support/users/thelaw/):
    Does it import the users
   though it shows the error? (Check for the janedoe and the johndoe examples in
   your user list) I also receive the invalid errors with the example file but the
   import works nevertheless. With my own csv files it works fine and without any
   errors… (as long as I stick to certain rules: don’t use passwords that are in
   use already and you have to use certain fields like user_login) Good luck 🙂
 *  [thelaw](https://wordpress.org/support/users/thelaw/)
 * (@thelaw)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469737)
 * [@nuttynuts](https://wordpress.org/support/users/nuttynuts/) – Thanks for your
   response. 🙂
 * (1) It doesn’t import any users at all, doesn’t matter what browser. I’m going
   to try a few different text editors.
 * (2) Password – I’ve found something that properly salts the passwords. This one
   does not? Not sure but it would seem that it doesn’t.
 * (3) Fields – I stuck with just the basics and couldn’t get it to work at all.
   Another CSV plugin works like a charm but only for four basic fields. This one
   has more flexibility, just seems like it is extremely finnicky as to format. 
   What concerns me is that even the sample CSV file didn’t work so I wonder what
   could be causing the error. I’ll do more testing tonight and report back.
 * Thanks again. 🙂
 *  [thesalmon](https://wordpress.org/support/users/thesalmon/)
 * (@thesalmon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469738)
 * I’ve had about 60 people register using my WP-Members form, and I did not activate
   them yet. I also filled out the registration myself, not with my admin email 
   address. Tonight I got the “you are approved” email even though I didn’t activate
   anyone. When I went to look at my list of users in the admin panel, the “Activated?”
   column is empty, it doesn’t say Yes or No, it’s just empty. When I look at the
   data for a single user the “Activated?” field is not showing at all.
 * When I sort by “not activated” no users are in the list. I think the plug-in 
   got buggy and activated everyone, and now I can’t de-activate them. Has anyone
   ever seen that or know how to fix it? Thanks.
 *  [thelaw](https://wordpress.org/support/users/thelaw/)
 * (@thelaw)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469739)
 * nuttynuts – you are *right* – it actually did do the import in spite of the error
   but the users did not appear throughout the multisite. I’m still going to try
   to use another tool for the moment.
 * thesalmon – Not sure what happened by you but why not use a mysql query to properly
   set the field for all the users at once?
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/#post-2469740)
 * [@thesalmon](https://wordpress.org/support/users/thesalmon/): The Import User
   from CSV plugin will run only when you upload a CSV file. It will not run everytime
   a user registers to your site. So the issue you are having is not related to 
   it. You should create a new forum topic about WP-Members.
 * [@thelaw](https://wordpress.org/support/users/thelaw/): Can you look into the
   users list in Network Admin? Maybe the users got added but where not assigned
   any role… Let me know so that I can troubleshoot that.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/page/2/?output_format=md)

The topic ‘[Plugin: Import Users from CSV] Error when importing example file’ is
closed to new replies.

 * ![](https://ps.w.org/import-users-from-csv/assets/icon-256x256.png?rev=2320381)
 * [Import Users from CSV](https://wordpress.org/plugins/import-users-from-csv/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-users-from-csv/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-users-from-csv/)
 * [Active Topics](https://wordpress.org/support/plugin/import-users-from-csv/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-users-from-csv/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-users-from-csv/reviews/)

 * 18 replies
 * 7 participants
 * Last reply from: [marsten](https://wordpress.org/support/users/marsten/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-error-when-importing-example-file/page/2/#post-2469798)
 * Status: resolved