Skip to content

Commit

Permalink
Convert arrays to string before inserting in cells
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Ogilvie committed May 5, 2018
1 parent 3997d40 commit 31863bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Utils/ReportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public function __construct(EntityManagerInterface $entityManager, Reader $reade
{
$this->entityManager = $entityManager;
$this->reader = $reader;

}

/**
Expand Down Expand Up @@ -137,6 +136,10 @@ private function createSpreadsheet($entities){
// Get the column number for the datafield in the array, and add the starting index.
$col = array_search($dataField, $personalDataColumnMap) + $privateColumnStart;

if(is_array($value)){
$value = implode(', ',$value);
}

$activeSheet->setCellValueByColumnAndRow($col,$row, $value);
}
}
Expand Down

0 comments on commit 31863bf

Please sign in to comment.