You are here

class webform_exporter_excel in Webform 7.3

Same name and namespace in other branches
  1. 5.2 webform_export.inc \webform_exporter_excel
  2. 6.3 includes/webform.export.inc \webform_exporter_excel
  3. 6.2 webform_export.inc \webform_exporter_excel

The Excel exporter currently is just a tab-delimited export.

Hierarchy

Expanded class hierarchy of webform_exporter_excel

1 string reference to 'webform_exporter_excel'
webform_webform_exporters in includes/webform.export.inc
Implements hook_webform_exporters().

File

includes/webform.export.inc, line 203
Provides several different handlers for exporting webform results.

View source
class webform_exporter_excel extends webform_exporter_delimited {
  public $delimiter;

  /**
   * {@inheritdoc}
   */
  public function __construct($options) {
    $options['delimiter'] = '\\t';
    parent::__construct($options);
  }

  /**
   * PHP 4 constructor compatibility shim.
   *
   * @deprecated in 7.x-3.30 and is removed from 7.x-4.0. Use PHP 5 class
   * instantiation instead.
   * @see https://www.drupal.org/project/webform/issues/3011149
   */
  public function webform_exporter_excel($options) {
    self::__construct($options);
  }

  /**
   *
   */
  public function set_headers($filename) {
    drupal_add_http_header('Content-Type', 'application/x-msexcel');
    drupal_add_http_header('Content-Disposition', "attachment; filename={$filename}.xls");
    drupal_add_http_header('Pragma', 'public');
    drupal_add_http_header('Cache-Control', 'max-age=0');
  }

}

Members