public function webform_exporter_excel::set_headers in Webform 7.3
Same name and namespace in other branches
- 5.2 webform_export.inc \webform_exporter_excel::set_headers()
- 6.3 includes/webform.export.inc \webform_exporter_excel::set_headers()
- 6.2 webform_export.inc \webform_exporter_excel::set_headers()
Overrides webform_exporter_delimited::set_headers
File
- includes/
webform.export.inc, line 228 - Provides several different handlers for exporting webform results.
Class
- webform_exporter_excel
- The Excel exporter currently is just a tab-delimited export.
Code
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');
}