Exemple #1
0
 /**
  * finder constructor.
  * @param $file_name
  */
 function __construct($file_name)
 {
     $filter = new filter();
     $this->arr_filter_day = $filter->getFilterDay();
     $this->arr_filter_groups = $filter->getFilterGroup();
     $y = $filter->getFilterDay();
     $this->objPHPExcel = PHPExcel_IOFactory::load($file_name);
     $this->getAllMergedCells($this->objPHPExcel);
     //забираем все страницы
     $this->arr_Work_Sheet = $this->objPHPExcel->getAllSheets();
     $this->getAllMergedCells($this->objPHPExcel);
     $this->objPHPExcel->setActiveSheetIndex(0);
     $r = $this->objPHPExcel->getActiveSheet();
     //  $this->arr_merged_allCells=$r->getMergeCells();
     // echo "sheet->".$this->objPHPExcel->getSheetCount();
     /*for ($i=0; $i<=9; $i++){
     
                 echo $r->getTitle();
             }*/
     $t = $r->getCell('B17');
     $q = $this->findTime($r);
     $w = $this->findGroups($r, 1);
     $this->arr_schedule = $this->findLessonS($r, $q, $w);
     // $this->testEcho($arr);
     // echo  $this->getDay($this->objPHPExcel, $r, $t,$y);
     //foreach ($this->arr_Work_Sheet as $sheet){
     // $this->testEcho($this->findTime($sheet));
     // }
     //     $this->arrFindTime = null;
     //   $this->arrFindGroup = null;
     // $this->filterDay = $filter->getFilterDay();
     //      $this->filterGroup = $filter->getFilterGroup();
     //    $this->findSchedule($this->arr_Work_Sheet);
     //       echo $this->getValueMergedCell($this->objPHPExcel, 0, $this->arr_merged_allCells,'A',54);
     //  $this->get();
     // $objPHPExcel1->setActiveSheetIndex(0);
     //забираем активную страницу
     //  $sheet = $objPHPExcel1->getActiveSheet();
     //   $this->sheet=$sheet;
     // $this->arrMerge= $sheet->getMergeCells();
     //   echo "<pre>";
     //  echo print_r(   $this->arrMerge);
     //  echo "</pre>";
     //проходимся по строкам
     //   $this->findGroups($sheet);
 }