You are here

function ViewsDataExportExporterExcelxlsx::bof in Views data export 7.4

Write the start of the export file.

Parameters

$file_handle: A PHP file handle to the export file.

Overrides ViewsDataExportExporter::bof

File

exporters/views_data_export_exporter_excel_xlsx.inc, line 104

Class

ViewsDataExportExporterExcelxlsx
This exporter creates an XLSX file readable by newer versions of Excel.

Code

function bof(&$file_handle) {

  // Our beginning of file needs to include unknown data (the number of
  // columns and rows) at this point. Instead of writing the true BOF, we
  // output enough empty space to fill in the BOF later.
  // See webform_exporter_excel_xlsx::eof().
  $output = str_repeat(' ', 1024);
  fwrite($file_handle, $output . "\n");
}