register users automatically 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.


Email
Username
Password
Real name
"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.

How?

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.
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