diff --git a/views_data_export.module b/views_data_export.module
index e303b1c..80f1f51 100644
--- a/views_data_export.module
+++ b/views_data_export.module
@@ -275,3 +275,80 @@ function views_data_export_view_clear($export_id) {
     ->execute();
   }
 }
+
+/**
+ * Implements hook_action_info().
+ */
+function views_data_export_action_info() {
+  return array(
+    'views_data_export_action_csv_export' => array(
+      'type' => 'entity',
+      'label' => t('Export to CSV'),
+      'configurable' => FALSE,
+      'behavior' => array('views_data_export_export_csv'),
+    ),
+  );
+}
+
+/**
+ * Implements callback for hook_action_info().
+ */
+function views_data_export_action_csv_export($entity, $context) {
+  static $csv;
+
+  $step = $context['progress']['current'];
+  $view = $context['options']['view'];
+  $fields = $view->query->fields;
+
+  $entity_type = $context['entity_type'];
+  $wrapper = entity_metadata_wrapper($entity_type, $entity);
+  $entity_info = $wrapper->entityInfo();
+
+  // Get header names
+  if (empty($csv)) {
+    $rows = array();
+    foreach ($fields as $key => $field) {
+      $data = isset($field['table']) ? views_fetch_data($field['table']) : views_fetch_data();
+      if (isset($data[$field['field']])) {
+        $rows[] = $data[$field['field']]['title'];
+      } else {
+        $field_data_name = str_replace('_' . $entity_info['base table'] . '_entity_type', '', $field['alias']);
+        $field_name = str_replace('field_data_', '', $field_data_name);
+        $rows[] = $data[$field_data_name][$field_name]['title short'] ?: $data[$field_data_name][$field_name]['title'];
+      }
+    }
+    $csv = "\"" . implode('","', array_values($rows)) . "\"\n";
+  }
+
+
+  $rows = array();
+  foreach ($fields as $key => $field) {
+    $data = isset($field['table']) ? views_fetch_data($field['table']) : views_fetch_data();
+    $field_name = $field['field'];
+    if (property_exists($entity, $field_name)) {
+      $rows[$key] = $entity->$field_name;
+    } else if (isset($view->style_plugin->rendered_fields[$step][$field_name])) {
+      $rows[$key] = $view->style_plugin->rendered_fields[$step][$field_name]; // assign the field value
+    } else if ($field['field'] == "'node'") {
+      $field_name = str_replace(array('field_data_', '_node_entity_type'), array('', ''), $field['alias']);
+      $field_value = $view->style_plugin->rendered_fields[$step][$field_name];
+      $rows[$key] = $field_value;
+    } else {
+      watchdog('views_data_export', 'Can not find field value for field when exporting (%field).', array('%field' => print_r($field, TRUE)), WATCHDOG_WARNING);
+    }
+  } // end: foreach
+
+  $csv .= "\"" . implode('","', $rows) . "\"\n";
+  
+  if ($context['progress']['current'] == $context['progress']['total']) {
+    $filename = $entity_type . '_export_' . format_date(time(), 'custom', 'Y-m-d');
+    $GLOBALS['devel_shutdown'] = FALSE;
+    
+    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+    header('Content-Type: text/csv');
+    header("Content-Disposition: attachment; filename='$filename.csv'");
+
+    die(print iconv('UTF-8', 'CP1251', $csv));
+  }
+}
+
