/**
  * 
  * @param $from
  * @param $to
  */
 protected function _exportDetailedStats($from, $to)
 {
     /* --------------------- EXPORTATION OF THE DETAILED STATS ------------------------ */
     $active_sheet = $this->getDocument()->getActiveSheet();
     /* ---------------------------------- BY GENDER ----------------------------------- */
     $imputationsGlobal = Doctrine_Query::create()->select('COUNT(*) as number, SUM(TIME_TO_SEC(i.duration)) as duration')->from('ImputationArchive i')->where('i.imputation_date BETWEEN ? AND ?', array($from, $to))->fetchOne();
     $numberImputations = $imputationsGlobal->getNumber();
     $totalDuration = $imputationsGlobal->getDuration();
     $active_sheet->setCellValueByColumnAndRow(0, $this->_row, $this->_translate(self::DETAILED_STATS));
     $active_sheet->mergeCells('A' . $this->_row . ':D' . $this->_row);
     $active_sheet->getStyle('A' . $this->_row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
     $active_sheet->getStyle('A' . $this->_row)->getFont()->setBold(true);
     $this->nextLine(2);
     /* --------------------------------- BY GENDER ---------------------------------- */
     $this->_exportDetailedValuesByGender($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* --------------------------------- BY AGE RANGE ---------------------------------- */
     $this->_exportDetailedValuesByAgeRange($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ------------------------------ BY COUNTRY AND CITY ------------------------------ */
     $this->_exportDetailedValuesByCountryAndCity($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ---------------------------------- BY DAY AND TIME ------------------------------ */
     $this->_exportDetailedValuesByDay($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ---------------------------------- BY PUBLIC CATEGORY ------------------------------ */
     $this->_exportDetailedValuesByPublicCategory($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ---------------------------------- BY PUBLIC CATEGORY ------------------------------ */
     $this->_exportDetailedValuesByAct($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ---------------------------------- BY PUBLIC CATEGORY ------------------------------ */
     $this->_exportDetailedValuesBySeg($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ---------------------------------- BY PUBLIC CATEGORY ------------------------------ */
     $this->_exportDetailedValuesByBuilding($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ---------------------------------- BY PUBLIC CATEGORY ------------------------------ */
     $this->_exportDetailedValuesByTypeOfConnection($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     /* ---------------------------------- BY PUBLIC CATEGORY ------------------------------ */
     $this->_exportDetailedValuesByAwareness($from, $to, $numberImputations, $totalDuration);
     $this->nextLine(3);
     $active_sheet->getColumnDimension('A')->setWidth(30);
     $active_sheet->getColumnDimension('B')->setAutoSize(true);
     $active_sheet->getColumnDimension('C')->setWidth(25);
     $active_sheet->getColumnDimension('D')->setWidth(8);
     $page_setup = new PHPExcel_Worksheet_PageSetup();
     $page_setup->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
     $page_setup->setFitToPage(true);
     $page_setup->setFitToWidth(1);
     $page_setup->setFitToHeight(0);
     $page_setup->setHorizontalCentered(true);
     $page_setup->setPrintArea('A1:D' . $this->_row);
     $active_sheet->setPageSetup($page_setup);
     $active_sheet->setShowGridlines(false);
     $active_sheet->setPrintGridlines(false);
     //Margins:
     $active_sheet->getPageMargins()->setTop(0.6);
     $active_sheet->getPageMargins()->setRight(0.4);
     $active_sheet->getPageMargins()->setLeft(0.4);
     $active_sheet->getPageMargins()->setBottom(0.7);
 }