You are here

protected function Xls::setSettings in Excel Serialization 8

Set XLS settings from the Views settings array.

Parameters

array $settings: An array of XLS settings.

1 call to Xls::setSettings()
Xls::encode in src/Encoder/Xls.php
Encodes data into the given format.
1 method overrides Xls::setSettings()
Xlsx::setSettings in src/Encoder/Xlsx.php
Set XLS settings from the Views settings array.

File

src/Encoder/Xls.php, line 326

Class

Xls
Adds XLS encoder support for the Serialization API.

Namespace

Drupal\xls_serialization\Encoder

Code

protected function setSettings(array $settings) {

  // Temporary fix this until it would be fixed at the views_data_export.
  if ($settings['xls_format'] == 'Excel2007') {
    $settings['xls_format'] = 'Xlsx';
  }
  if ($settings['xls_format'] == 'Excel5') {
    $settings['xls_format'] = 'Xls';
  }
  $this->xlsFormat = $settings['xls_format'];
}