Last updated May 24, 2010. Created on May 21, 2010.
Edited by tomhung. Log in to edit this page.

Webform Import

Upload of webform submission results from a delimited file.
(comma, tab, semicolon, pipe, period, and space) For simplicity I will refer to this as CSV.




* download latest tarball from
* untar in your sites /sites/modules/ directory
* go to admin/build/modules
* Check "webform import"
* Save


* drush dl webform_import
* drush en webform_import


Getting Started

* create a webform
* create webform components to match your CSV data

Prepare to Upload the CSV file (gotchas!)

* NOTICE: usually disable the "required" field requirement. If its left on, the upload will not take if a required field is missing.
* NOTICE: Insure your Selection Component's "Key|Value" pair reflects the "Key" in your CSV file
* NOTICE: webform file component will not be added
* edit your CSV files header to match either the "Field Names" or "Field Form Keys"
* you can download a template from the "Instructions" fieldset on the "Upload" tab.

Component specific help

* Date: must be in a format parsable by the php function strtotime() Any time data will be discarded.
* Grid: option keys must be separated by commas and in the order of the questions in the webform. (e.g., "red,male,car" for the questions "Favorite color, Gender, Type of automobile you drive" respectively.)
* File: currently unable to handle this component.
* Select: for multiselect answer keys must be separated by commas. (e.g., "1,2,3")
* Time: must be in a format parsable by the php function strtotime() Any date data will be discarded.

Uploading the CSV file

* go to the "Webform"
* go to "Results" tab
* go to "Upload" sub-tab
* choose CSV file from local filessystem
* choose delimter
* choose header match criteria "Field Names" or "Field Form Keys"
* check results count & errors

Editing submissions results via Export / Upload

Webform Export will output a CSV file that is compatible with Webform Import. If the SID column is present the Import will UPDATE the record. You can use this feature to do significant updates to submission results.


* just disable & remove module
* drush dis webform_import
* NOTICE: no database tables are added

Looking for support? Visit the forums, or join #drupal-support in IRC.


Tony_mc’s picture

Im having a bit of difficulty importing my csv files. Could someone maybe provide me with an example of how this should look? I downloaded the template, then inserted the relevant new info to import and my screen just goes blank. Any help with this would be greatly appriciated.

kurtismccartney’s picture

Webform Import doesn't seem to send out the emails that are configured for a given form is there a way to enable that function or batch resend to a set of SID values?

gennadiy’s picture

I had success with webform_import-7.x-1.3 for webform-7.x-4.3.
1st I used Download tab to export some of the submitted data to see what are the field names/data. Then I prepared the table and after experimenting found the format for the date column "Submission DateTime" that import works with - it's Unix Timestamp. Converted dates in Excel, using formula (it is for mm/dd/yyyy on Windows, format for DATE is DATE(YYYY,MM,DD)), that you may easy adjust for yourself:
So I got data for import like this and then outputted it to csv:

9. Overall, I would rate this program as: Submission DateTime
Excellent 1400198400

Import was OK, but Analysis wasn't working. This is because you shouldn't import the "Value" - in my case "Excellent", but the "Key" for it, which is "2". To look what are those "Key|Value" find the string for your field in the "extra" field of the webform_component table in the drupal's database, e.g. "2|Excellent3|Good4|Neutral5|Fair6|Poor". So corrected table worked well:

9. Overall, I would rate this program as: Submission DateTime
2 1400198400

Denis10’s picture

I don't known if someone have this problem but the import data desn't work when we want to put data in field which are in group.
Have you a solution ?
Thanks a lot