I add a new text field that called real name(for entering the real first and last name). And a "selection filed" that user can select his field between A to D.

Now for registration we have 5 field.

  1. Email
  2. Username
  3. Password
  4. Real name
  5. "Selection field"

And I have an Excel file that contains about 500 users data(all data are in there such as user name and password and ...)

Now I need a similar code to register them automatically in my drupal site.


Note:In the "selection field" the choice are such as First-one First-two and so on.

Example:this is a similar column in my excel file

Username     password     realname     Email     SelectionFild
12321        12321        Mr.Bin       -         F1

Note:in this example - in the Email means the user haven't Email address. And F1 in the selection field means First-one.

1 Answer 1


You can use feeds module which import data, uses, taxonomy term into Drupal website using CSV file.

In module page:

Import or aggregate data as nodes, users, taxonomy terms or simple database records.

  • One-off imports and periodic aggregation of content
  • Import or aggregate RSS/Atom feeds
  • Import or aggregate CSV files
  • Import or aggregate OPML files
  • Create nodes, users, taxonomy terms or simple database records from import
  • Extensible to import any other kind of content
  • Granular mapping of input elements to Drupal content elements
  • Exportable configurations Batched import for large files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.