You are here

function _phpexcel_set_properties in PHPExcel 6

Same name and namespace in other branches
  1. 8.3 phpexcel.inc \_phpexcel_set_properties()
  2. 6.2 phpexcel.api.inc \_phpexcel_set_properties()
  3. 7.3 phpexcel.inc \_phpexcel_set_properties()
  4. 7 phpexcel.api.inc \_phpexcel_set_properties()
  5. 7.2 phpexcel.inc \_phpexcel_set_properties()

Sets the Excel file properties, like creator, title, etc.

See also

phpexcel_export()

1 call to _phpexcel_set_properties()
phpexcel_export in ./phpexcel.api.inc
Simple API function which will generate an XLS file and save it in $path.

File

./phpexcel.api.inc, line 146
Defines the phpexcel api functions that other modules can use.

Code

function _phpexcel_set_properties(&$properties, $options) {
  if (isset($options['creator'])) {
    $properties
      ->setCreator($options['creator']);
  }
  else {
    $properties
      ->setCreator("PHPExcel");
  }
  if (isset($options['title'])) {
    $properties
      ->setTitle($options['title']);
  }
  if (isset($options['subject'])) {
    $properties
      ->setSubject($options['subject']);
  }
  if (isset($options['description'])) {
    $properties
      ->setDescription($options['description']);
  }
}