Search code examples
mysqlexceldrupaldrupal-7field

how to import excel data to 5 specified fields in drupal


I have a excel exported file include 5 fields data from a sql server database.

So, I want to import this 5 field exported data to 5 specified field on drupal (this 5 field is added to drupal user profiles) .

Is feeds module or feed_import module helpful?

I want to do such as following:

field 1 (from excel file)  ---->   field_profile1 (on user drupal fields)
field 2 (from excel file)  ---->   field_profile2 (on user drupal fields)
field 3 (from excel file)  ---->   field_profile3 (on user drupal fields)

Can you help me for this issue?

How I can import this 5 fields from excel file to special 5 field on drupal user profile?


Solution

  • I use a lot feeds module on some projects and it works exactly how you need it. You'll probably have to convert Excel (XLS / XLSX) files to CSV files.

    1/ Install feeds modules (feeds & feeds_ui).

    2/ Add a new importer (structure > Feeds > add importer)

    3/ Define the settings :

    • Fetcher : File upload
    • Parser : CSV parser
    • Processor : User processor
    • Mapping : The list of column of your CSV file (named is easier) to fields

    4/ Go to /import and select the importer you just create.

    5/ Validate the settings (separator, header or not, charset) and import the file...

    Feeds has a really nice documentation and you can also find lots of examples and tutorials...