Skip to content
Snippets Groups Projects
Commit 13cce88d authored by jaapjansma's avatar jaapjansma
Browse files

Fixed column headers

parent 8a16a8f3
No related branches found
No related tags found
No related merge requests found
......@@ -160,7 +160,7 @@ abstract class CRM_DataprocessorOutputExport_AbstractSpreadsheet extends CRM_Dat
* @return string
*/
public function getTitleForExport($output, $dataProcessor): string {
return E::ts('Download as CSV');
return E::ts('Download as Spreadsheet');
}
/**
......@@ -181,7 +181,10 @@ abstract class CRM_DataprocessorOutputExport_AbstractSpreadsheet extends CRM_Dat
protected function createHeader($filename, AbstractProcessorType $dataProcessorClass, $configuration, $dataProcessor, $idField=null, $selectedIds=array(), $formValues=array()) {
$fields = new DataSpecification();
try {
$fields = $dataProcessorClass->getDataFlow()->getDataSpecification();
foreach ($dataProcessorClass->getDataFlow()->getOutputFieldHandlers() as $outputHandler) {
$field = $outputHandler->getOutputFieldSpecification();
$fields->addFieldSpecification($field->name, $field);
}
} catch (InvalidFlowException|FieldExistsException $e) {
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment