protected function setDimensions(\PHPExcel_Worksheet $excelWorksheet, $excelElement, $documentElement)
    {
        $dimensions = $this->getDimensionsArray($documentElement);

        if (isset($dimensions['column']) && $excelElement instanceof \PHPExcel_Cell) {
            foreach($dimensions['column'] as $columnKey => $columnValue) {
                $method = 'set'.ucfirst($columnKey);
                $excelWorksheet->getColumnDimension($excelElement->getColumn())->$method($columnValue);
            }
        }

        if (isset($dimensions['row'])) {
            foreach($dimensions['row'] as $rowKey => $rowValue) {
                $method = 'set'.ucfirst($rowKey);
                if ($excelElement instanceof \PHPExcel_Cell) {
                    $excelWorksheet->getRowDimension($excelElement->getRow())->$method($rowValue);
                } elseif ($excelElement instanceof \PHPExcel_Worksheet_Row) {
                    $excelWorksheet->getRowDimension($excelElement->getRowIndex())->$method($rowValue);
                }

            }
        }
    }