public function webform_exporter_excel_delimited::bof in Webform 7.4
Write the start of the export file.
Parameters
$file_handle: A PHP file handle to the export file.
Overrides webform_exporter::bof
File
- includes/
exporters/ webform_exporter_excel_delimited.inc, line 19
Class
- webform_exporter_excel_delimited
- The Excel exporter currently is just a tab-delimited export.
Code
public function bof(&$file_handle) {
$output = '';
// Include at BOM at the beginning of the file for Little Endian.
// This makes tab-separated imports work correctly in MS Excel.
if (function_exists('mb_convert_encoding')) {
$output = chr(255) . chr(254);
}
@fwrite($file_handle, $output);
}