diff --git a/~dev_rating/application/classes/Controller/Handler/FileCreator.php b/~dev_rating/application/classes/Controller/Handler/FileCreator.php
new file mode 100644
index 0000000000000000000000000000000000000000..1f79d0090faf1e3181598ec4e6afcc356ae04f53
--- /dev/null
+++ b/~dev_rating/application/classes/Controller/Handler/FileCreator.php
@@ -0,0 +1,275 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class Controller_Handler_FileCreator extends Controller_Handler
+{
+
+    public function before() {
+        $this->model = new Model_Teacher_Rating;
+        $this->setAccessLevel(self::ACCESS_USER);
+        parent::before();
+    }
+    
+    // Таблица баллов (со страницы оценивания) [dev version]
+    public function action_GenerateExcelRatingTable()
+    {
+        // TODO CHECK!!!
+
+            $xls = new PHPExcel();
+
+            // Устанавливаем индекс активного листа
+            $xls->setActiveSheetIndex(0);
+
+            // Получаем активный лист
+            $sheet = $xls->getActiveSheet();
+
+
+            // Шапка таблицы: структура УКД (модули и мероприятия)
+            $structure = $this->model->GetMapForDiscipline($this->user['TeacherID'], $this->post->offsetGet('disciplineID'));
+
+            $structureHandled = array();
+            $maxRate = 0; $i = 0; $module = 0;
+
+            foreach($structure as $row)
+            {
+                if($row['ModuleID'] != $module)
+                {
+                    $i++;
+                    $module = $row['ModuleID'];
+                }
+                if(!isset($structureHandled[$i]['SubmodulesCount']))
+                {
+                    $structureHandled[$i]['SubmodulesCount'] = 0;
+                    $structureHandled[$i]['MaxRate'] = 0;
+                }
+                $j = $structureHandled[$i]['SubmodulesCount'] += 1;
+                $structureHandled[$i]['MaxRate'] += (int) $row['MaxRate'];
+                $structureHandled[$i]['ModuleTitle'] = $row['ModuleName'];
+                $structureHandled[$i]['ModuleType'] = $row['ModuleType'];
+                        
+                $structureHandled[$i][$j]['SubmoduleID'] = $row['SubmoduleID'];
+                $structureHandled[$i][$j]['Title'] = $row['SubModuleName'];
+
+                $structureHandled[$i][$j]['MaxRate'] = (int) $row['MaxRate'];
+                $maxRate += $row['MaxRate'];
+            }
+            $structureHandled['ModulesCount'] = $i;
+            $structureHandled['MaxRate'] = (int) $maxRate;
+
+            $sheet->setCellValueByColumnAndRow(
+                0, // Столбец. Индексация с 0
+                1, // Строка. Индексация с 1
+                'Модуль'
+            );
+
+            $sheet->setCellValueByColumnAndRow(
+                0,
+                2,
+                'Мероприятие'
+            );
+
+            $sheet->setCellValueByColumnAndRow(
+                0,
+                3,
+                'Макс. балл'
+            );
+
+            $SubmodulesCount = 0;
+            // Модули
+            for ($k = 1; $k <=  $structureHandled['ModulesCount']; $k++)
+            {
+                if ($k == 1) $pointer = 1;
+
+                $sheet->mergeCellsByColumnAndRow($pointer, 1, $pointer + $structureHandled[$k]['SubmodulesCount'] - 1, 1);
+
+                $sheet->setCellValueByColumnAndRow(
+                    $pointer,
+                    1,
+                    $structureHandled[$k]['ModuleTitle']
+                );
+
+                $l = 0;
+                // Мероприятия
+                for ($l = 1; $l <= $structureHandled[$k]['SubmodulesCount']; $l++)
+                {
+                    $sheet->setCellValueByColumnAndRow(
+                        $pointer + $l - 1,
+                        2,
+                        $structureHandled[$k][$l]['Title']
+                    );
+
+                    $sheet->setCellValueByColumnAndRow(
+                        $pointer + $l - 1,
+                        3,
+                        $structureHandled[$k][$l]['MaxRate']
+                    );
+                    $SubmodulesCount++;
+                }
+
+                $pointer = $structureHandled[$k]['SubmodulesCount'] + 1;
+            }
+
+            $sheet->setCellValueByColumnAndRow(
+                $SubmodulesCount + 1,
+                1,
+                'Итог'
+            );
+
+            $sheet->mergeCellsByColumnAndRow( $SubmodulesCount + 1, 1,  $SubmodulesCount + 1, 3 );
+
+            // Студенты и их баллы
+            $students = $this->model->GetStudentsForRating($this->user['TeacherID'], $this->post->offsetGet('disciplineID'));
+
+            $i_s = 0; $curGroup = 0; $ratesum = 0;
+
+            foreach($students as $row) {
+                if ($curGroup !== $row['GroupID']) {
+                    $curGroup = $row['GroupID'];
+                    $i_s++;
+                    $sheet->mergeCellsByColumnAndRow( 0, 3 + $i_s,  $SubmodulesCount + 1, 3 + $i_s );
+                    $sheet->setCellValueByColumnAndRow(
+                        0,
+                        3 + $i_s,
+                        $row['GroupNum']." РіСЂСѓРїРїР°"
+                    );
+                }
+                // Студенты
+                $i_s++;
+                $ratesum += $r['Rate'];
+
+                $sheet->setCellValueByColumnAndRow(
+                    0,
+                    3 + $i_s,
+                    $row['Last'].' '.$row['First'].' '.$row['Second']
+                );
+
+                // Баллы студента
+                $rate = $this->model->getMapForStudent($row['ID'], $this->post->offsetGet('disciplineID'));
+                $i_r = 0;
+                foreach($rate as $r) {
+                    $i_r++;
+                    $sheet->setCellValueByColumnAndRow(
+                        $i_r,
+                        3 + $i_s,
+                        $r['Rate']
+                    );
+                }
+
+                $sheet->setCellValueByColumnAndRow(
+                    $SubmodulesCount + 1, // Столбец. Индексация с 0
+                    3 + $i_s,
+                    $ratesum
+                );
+
+            }
+
+
+            $this->GetHeaders();
+             
+            // Выводим содержимое файла
+            $objWriter = new PHPExcel_Writer_Excel5($xls);
+            $objWriter->save('php://output');
+    }
+
+    // Ведомость
+    public function action_GenerateExcelStatement()
+    {
+        // TODO CHECK!!!
+
+        // parameters
+        $disciplineID = $this->post->offsetGet('disciplineID');
+        $groupID = $this->post->offsetGet('studyGroupID');
+
+        //$disciplineID = 266;
+        //$groupID = 11;
+        
+        // preparation
+        $db = $this->model;
+        $info = $db->getFinalFormInfo($disciplineID, $groupID);
+        $type = $info[0]['ExamType'];
+        // $specName = '';  <------- TODO
+        
+        $templateFile = DOCROOT."docs/template $type.xls";
+        if (!file_exists($templateFile)) {
+            exit("template wasn't found" . PHP_EOL); // TODO
+        }
+        
+        $result = $db->getRatesForStudentsGroup($this->user['TeacherID'], $disciplineID, $groupID);
+        $rowsCount = count($result); // Получаем количество записей 
+        
+        $objPHPExcel = PHPExcel_IOFactory::load($templateFile);
+        $objPHPExcel->setActiveSheetIndex(0);
+        
+    
+        // fill header
+        $range = $objPHPExcel->getNamedRange("Discipline")->getRange();
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", $info[0]['SubjectName']);
+        $range = $objPHPExcel->getNamedRange("Subdivision")->getRange();
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", $info[0]['FacultyName']);
+        $range = $objPHPExcel->getNamedRange("Major")->getRange();  
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", "Специальность: ".$info[0]['SpecName']." ".$info[0]['SpecCode']);
+        $range = $objPHPExcel->getNamedRange("Teacher")->getRange();
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", $info[0]['LastName']." ".$info[0]['FirstName']." ".$info[0]['SecondName']);
+        $range = $objPHPExcel->getNamedRange("Grade")->getRange();
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", $info[0]['GradeNum']);
+        $range = $objPHPExcel->getNamedRange("Semester")->getRange();
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", $info[0]['SemesterNum']);
+        $range = $objPHPExcel->getNamedRange("Year")->getRange();
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", $info[0]['Year']);
+        $range = $objPHPExcel->getNamedRange("CreationDate")->getRange();
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", date("m.d.y"));
+        $range = $objPHPExcel->getNamedRange("Date")->getRange();
+        if ($type == 'exam') 
+            $controlDate = '__________';
+        else
+            $controlDate = '30.12.2014';
+        $objPHPExcel->getActiveSheet()->setCellValue("$range", "Дата зачета \n$controlDate");
+    
+        // fill students rows
+        $startRow = 12; 
+        $finalRow = 52; 
+        $indPosition = 'A'; // Номер 
+        $namePosition = 'B';  // ФИО 
+        $totalRatePosition = 'G';  // Итоговый рейтинг 
+        $semesterRatePosition  = 'H';   // Сумма баллов
+        $bonusRatePosition = 'I'; // Бонусные баллы
+        $rowNumber = $startRow;
+        $index = 1;
+        foreach($result as $studentInfo){
+            
+            $lastName = $studentInfo['Last'];
+            $firstName = $studentInfo['First'];
+            $secondName = $studentInfo['Second'];
+            $rate = (int)$studentInfo['intermediate'];
+            $bonus = (int)$studentInfo['bonus'];
+            $fullName = "$lastName  $firstName $secondName";
+            $totalRate = $rate + $bonus;
+       
+            $objPHPExcel->getActiveSheet()->setCellValue("$indPosition$rowNumber", "$index")
+                                  ->setCellValue("$namePosition$rowNumber", "$fullName")
+                                  ->setCellValue("$totalRatePosition$rowNumber", "$totalRate")
+                                  ->setCellValue("$semesterRatePosition$rowNumber","$rate")
+                                  ->setCellValue("$bonusRatePosition$rowNumber","$bonus");
+            $rowNumber++;
+            $index++;
+        }    
+
+        // delete rest rows
+        $objPHPExcel->getActiveSheet()->removeRow($rowNumber+1, $finalRow);
+
+        $this->GetHeaders('FinalForm');
+
+        $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+        $objWriter->save('php://output');
+    }
+
+    // Выводим HTTP-заголовки
+    public function GetHeaders($filename = 'excel')
+    {
+        $this->response->headers("Last-Modified", gmdate("D,d M YH:i:s") . " GMT" );
+        $this->response->headers( "Cache-Control", " no-cache, must-revalidate" );
+        $this->response->headers("Pragma", " no-cache" );
+        $this->response->headers("Content-type", " application/vnd.ms-excel" );
+        $this->response->headers("Content-Disposition", "attachment; filename=".$filename.".xls" );
+    }
+
+}
\ No newline at end of file
diff --git a/~dev_rating/application/classes/Controller/Handler/Rating.php b/~dev_rating/application/classes/Controller/Handler/Rating.php
index f80cb616cb86b4f5c2df1a15abedaed96031afe6..e6250adf00e6f26670938e55892702602a563f8c 100644
--- a/~dev_rating/application/classes/Controller/Handler/Rating.php
+++ b/~dev_rating/application/classes/Controller/Handler/Rating.php
@@ -1,218 +1,49 @@
 <?php defined('SYSPATH') or die('No direct script access.');
 
-class Controller_Handler_Rating extends Controller_Handler {
-
-        public function before() {
-            $this->model = new Model_Teacher_Rating;
-            $this->setAccessLevel(self::ACCESS_USER);
-            parent::before();
-        }
-
-        public function action_SetRate()
-        {
-			$data['success'] = false;
-            $this->post -> rule('student', 'not_empty')
-                        -> rule('student', 'digit')
-                        -> rule('submodule', 'not_empty')
-                        -> rule('submodule', 'digit')
-                        -> rule('rate', 'digit')
-                        -> rule('rate', 'range', array(':value', 0, 100));
-            if($this->post->check()) {
-                $result = $this->model->SetStudentRate( $this->user['TeacherID'], 
-                                                        $this->post->offsetGet('student'), 
-                                                        $this->post->offsetGet('submodule'), 
-                                                        $this->post->offsetGet('rate'));
-				$data['success'] = ($result[0]['Num'] == 0);
-            }
-            $this->response->body(json_encode($data));
+class Controller_Handler_Rating extends Controller_Handler
+{
+    
+    public function before() {
+        $this->model = new Model_Teacher_Rating;
+        $this->setAccessLevel(self::ACCESS_USER);
+        parent::before();
+    }
+
+    public function action_SetRate()
+    {
+		$data['success'] = false;
+        $this->post -> rule('student', 'not_empty')
+                    -> rule('student', 'digit')
+                    -> rule('submodule', 'not_empty')
+                    -> rule('submodule', 'digit')
+                    -> rule('rate', 'digit')
+                    -> rule('rate', 'range', array(':value', 0, 100));
+        if($this->post->check()) {
+            $result = $this->model->SetStudentRate( $this->user['TeacherID'], 
+                                                    $this->post->offsetGet('student'), 
+                                                    $this->post->offsetGet('submodule'), 
+                                                    $this->post->offsetGet('rate'));
+			$data['success'] = ($result[0]['Num'] == 0);
         }
-
-        public function action_SelectGroup(){
-            $data['success'] = false;
-            $this->post -> rule('disciplineID', 'digit')
-                        -> rule('disciplineID', 'not_empty')
-                        -> rule('groupSelected', 'digit')
-                        -> rule('groupSelected', 'not_empty');
-            if($this->post->check()) {
-                //$SGID = Cookie::get('SGID', null);
-                $SG_json = json_decode(Cookie::get('SGID', null), true);
-                
-                $SG_json[$this->post->offsetGet('disciplineID')] = $this->post->offsetGet('groupSelected');
-
-                Cookie::set('SGID', json_encode($SG_json), '2592000'); 
-                $data['success'] = true;
-            }
-            $this->response->body(json_encode($data));
-        }
-
-
-        // TODO : ПЕРЕНОС В СВОЙ handler/GenerateFiles.php
-        public function action_GetExcelRateTable() {
-
-            // Создаем объект класса PHPExcel
-            $xls = new PHPExcel();
-            // Устанавливаем индекс активного листа
-            $xls->setActiveSheetIndex(0);
-
-            // Получаем активный лист
-            $sheet = $xls->getActiveSheet();
-            // Подписываем лист
-            //$sheet->setTitle('Баллы');
-
-            //$sheet->setCellValue("A1", 'Баллы');
-
-            // Шапка таблицы: структура УКД (модули и мероприятия)
-            $structure = $this->model->GetMapForDiscipline($this->user['TeacherID'], $this->post->offsetGet('disciplineID'));
-
-            $structureHandled = array();
-            $maxRate = 0; $i = 0; $module = 0;
-
-            foreach($structure as $row)
-            {
-                if($row['ModuleID'] != $module)
-                {
-                    $i++;
-                    $module = $row['ModuleID'];
-                }
-                if(!isset($structureHandled[$i]['SubmodulesCount']))
-                {
-                    $structureHandled[$i]['SubmodulesCount'] = 0;
-                    $structureHandled[$i]['MaxRate'] = 0;
-                }
-                $j = $structureHandled[$i]['SubmodulesCount'] += 1;
-                $structureHandled[$i]['MaxRate'] += (int) $row['MaxRate'];
-                $structureHandled[$i]['ModuleTitle'] = $row['ModuleName'];
-                $structureHandled[$i]['ModuleType'] = $row['ModuleType'];
-                        
-                $structureHandled[$i][$j]['SubmoduleID'] = $row['SubmoduleID'];
-                $structureHandled[$i][$j]['Title'] = $row['SubModuleName'];
-
-                $structureHandled[$i][$j]['MaxRate'] = (int) $row['MaxRate'];
-                $maxRate += $row['MaxRate'];
-            }
-            $structureHandled['ModulesCount'] = $i;
-            $structureHandled['MaxRate'] = (int) $maxRate;
-
-            $sheet->setCellValueByColumnAndRow(
-                0, // Столбец. Индексация с 0
-                1, // Строка. Индексация с 1
-                'Модуль'
-            );
-
-            $sheet->setCellValueByColumnAndRow(
-                0,
-                2,
-                'Мероприятие'
-            );
-
-            $sheet->setCellValueByColumnAndRow(
-                0,
-                3,
-                'Макс. балл'
-            );
-
-            $SubmodulesCount = 0;
-            // Модули
-            for ($k = 1; $k <=  $structureHandled['ModulesCount']; $k++)
-            {
-                if ($k == 1) $pointer = 1;
-
-                $sheet->mergeCellsByColumnAndRow($pointer, 1, $pointer + $structureHandled[$k]['SubmodulesCount'] - 1, 1);
-
-                $sheet->setCellValueByColumnAndRow(
-                    $pointer,
-                    1,
-                    $structureHandled[$k]['ModuleTitle']
-                );
-
-                $l = 0;
-                // Мероприятия
-                for ($l = 1; $l <= $structureHandled[$k]['SubmodulesCount']; $l++)
-                {
-                    $sheet->setCellValueByColumnAndRow(
-                        $pointer + $l - 1,
-                        2,
-                        $structureHandled[$k][$l]['Title']
-                    );
-
-                    $sheet->setCellValueByColumnAndRow(
-                        $pointer + $l - 1,
-                        3,
-                        $structureHandled[$k][$l]['MaxRate']
-                    );
-                    $SubmodulesCount++;
-                }
-
-                $pointer = $structureHandled[$k]['SubmodulesCount'] + 1;
-            }
-
-            $sheet->setCellValueByColumnAndRow(
-                $SubmodulesCount + 1,
-                1,
-                'Итог'
-            );
-
-            $sheet->mergeCellsByColumnAndRow( $SubmodulesCount + 1, 1,  $SubmodulesCount + 1, 3 );
-
-            // Студенты и их баллы
-            $students = $this->model->GetStudentsForRating($this->user['TeacherID'], $this->post->offsetGet('disciplineID'));
-
-            $i_s = 0; $curGroup = 0; $ratesum = 0;
-
-            foreach($students as $row) {
-                if ($curGroup !== $row['GroupID']) {
-                    $curGroup = $row['GroupID'];
-                    $i_s++;
-                    $sheet->mergeCellsByColumnAndRow( 0, 3 + $i_s,  $SubmodulesCount + 1, 3 + $i_s );
-                    $sheet->setCellValueByColumnAndRow(
-                        0,
-                        3 + $i_s,
-                        $row['GroupNum']." РіСЂСѓРїРїР°"
-                    );
-                }
-                // Студенты
-                $i_s++;
-                $ratesum += $r['Rate'];
-
-                $sheet->setCellValueByColumnAndRow(
-                    0,
-                    3 + $i_s,
-                    $row['Last'].' '.$row['First'].' '.$row['Second']
-                );
-
-                // Баллы студента
-                $rate = $this->model->getMapForStudent($row['ID'], $this->post->offsetGet('disciplineID'));
-                $i_r = 0;
-                foreach($rate as $r) {
-                    $i_r++;
-                    $sheet->setCellValueByColumnAndRow(
-                        $i_r,
-                        3 + $i_s,
-                        $r['Rate']
-                    );
-                }
-
-                $sheet->setCellValueByColumnAndRow(
-                    $SubmodulesCount + 1, // Столбец. Индексация с 0
-                    3 + $i_s,
-                    $ratesum
-                );
-
-            }
-
-
-            // Выводим HTTP-заголовки
-            $this->response->headers("Expires", "Mon, 1 Apr 1974 05:00:00 GMT" );
-            $this->response->headers("Last-Modified", gmdate("D,d M YH:i:s") . " GMT" );
-            $this->response->headers( "Cache-Control", " no-cache, must-revalidate" );
-            $this->response->headers("Pragma", " no-cache" );
-            $this->response->headers("Content-type", " application/vnd.ms-excel" );
-            $this->response->headers("Content-Disposition", "attachment; filename=RateTable.xls" );
-             
-            // Выводим содержимое файла
-            $objWriter = new PHPExcel_Writer_Excel5($xls);
-            $objWriter->save('php://output');
-
+        $this->response->body(json_encode($data));
+    }
+
+    public function action_SelectGroup(){
+        $data['success'] = false;
+        $this->post -> rule('disciplineID', 'digit')
+                    -> rule('disciplineID', 'not_empty')
+                    -> rule('groupSelected', 'digit')
+                    -> rule('groupSelected', 'not_empty');
+        if($this->post->check()) {
+            //$SGID = Cookie::get('SGID', null);
+            $SG_json = json_decode(Cookie::get('SGID', null), true);
+            
+            $SG_json[$this->post->offsetGet('disciplineID')] = $this->post->offsetGet('groupSelected');
+
+            Cookie::set('SGID', json_encode($SG_json), '2592000'); 
+            $data['success'] = true;
         }
+        $this->response->body(json_encode($data));
+    }
 
 }
\ No newline at end of file
diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php
index 62009e0a880bf3ba16eb1bcd7e627aca387e3981..3e2ca4533bf81e4d1de7f4632f976842acdf4d20 100644
--- a/~dev_rating/application/classes/Controller/Teacher/Rating.php
+++ b/~dev_rating/application/classes/Controller/Teacher/Rating.php
@@ -128,8 +128,6 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
             }
         }
 
-        //echo Debug::vars($rateHandled);
-
         $twig->rateTable = $rateHandled;
         $twig->groups = $groupsHandled;
 
@@ -147,11 +145,12 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
         $id = $this->request->param('id');
         $db = new Model_Teacher_Rating;
 
-        // Узнаем ExamType
+        // Узнаем ExamType TODO
         $dbMap = new Model_Teacher_Map;
         $disc_temp = $dbMap->getDisciplineInfoByID($id);
-        $disciplineInfo['ExamType'] = $disc_temp['ExamType'];
+        $disciplineInfo['ExamType'] = $disc_temp[0]['ExamType'];
         $disciplineInfo['ID'] = $id;
+        // END TODO
 
         // Шапка таблицы: структура УКД (модули и мероприятия)
         $structure = $db->GetMapForDisciplineExam($this->UserInfo['TeacherID'], $id);
diff --git a/~dev_rating/application/views/teacher/exam.twig b/~dev_rating/application/views/teacher/exam.twig
index 814ac708b5a32398cafff85cf6c62edb334a09e5..425d045cb6607bd35a443f3e98baab387caf02f6 100644
--- a/~dev_rating/application/views/teacher/exam.twig
+++ b/~dev_rating/application/views/teacher/exam.twig
@@ -3,6 +3,8 @@
 {% block title %}Сессия{% endblock %} {# head -> title #}
 {% block media %} {# head -> css, js #}
 	{{ HTML.script('media/js/functions.js')|raw }}
+
+	{{ HTML.script('media/js/jquery.fileDownload.js')|raw }}
 	
 	{{ HTML.style('media/css/rating.css')|raw }}
 	{{ HTML.script('media/js/rating.js')|raw }}
@@ -10,15 +12,15 @@
 
 {% block main_top_title %}Сессия{% endblock %}
 {% block main_content %}
-	<h2 style="margin-left: 2.5%; font-weight: normal; color: #3399CC;">Экзамен</h2>
-
+	<h2 style="margin-left: 2.5%; font-weight: normal; color: #3399CC;">
 	{% if disciplineInfo.ExamType == 'exam' %}
-		<button class="downloadExamTable">Скачать отчёт по экзамену</button>
-    {% else %}
-    	<button class="downloadCreditTable">Скачать отчёт по зачету</button>
+		Экзамен
+	{% else %}
+		Зачет
 	{% endif %}
+	</h2>
 
-    {{ HTML.anchor('rate/'~DisciplineID, 
+    {{ HTML.anchor('rate/'~disciplineInfo.ID, 
             "Перейти к оцениванию", 
             {'title': 'Оценивание', 'class': 'rate_a'})|raw }}
 
@@ -73,7 +75,10 @@
 		{% set row = 0 %}
 		{% for group in rateTable %}
 			<tr class="group {{ group.GroupID }}">
-				<td colspan="{{ CellCount + 3 }}">{% if group.isAttached == 1 %} {{ group.GradeTitle }} {% endif %}{{ group.GroupNum }} РіСЂСѓРїРїР°</td>
+				<td colspan="{{ CellCount + 3 }}">
+					{% if group.isAttached == 1 %} {{ group.GradeTitle }} {% endif %}{{ group.GroupNum }} РіСЂСѓРїРїР°.
+					<span class="downloadExcelStatement" id="{{ group.GroupID }}">Скачать ведомость</span>
+				</td>
 			</tr>
 			{% for student in group.Students %}
 				{% set row = row + 1 %}
diff --git a/~dev_rating/application/views/teacher/rating.twig b/~dev_rating/application/views/teacher/rating.twig
index f0113fa177c393ad8889a5e0b0422a91a739d7c7..8e377353b125833b02cd509f8bd5fb7cf1931e14 100644
--- a/~dev_rating/application/views/teacher/rating.twig
+++ b/~dev_rating/application/views/teacher/rating.twig
@@ -14,7 +14,7 @@
 {% block main_content %}
 	<h2 style="margin-left: 2.5%; font-weight: normal; color: #3399CC;">{{ SubjectName }}</h2>
 
-	<button class="downloadExcel">Скачать в excel формате</button>
+	<button class="downloadExcel">Скачать в excel формате [dev version]</button>
     {{ HTML.anchor('exam/'~DisciplineID, 
             "Перейти к сессии", 
             {'title': 'Сессия', 'class': 'exam_a'})|raw }}
diff --git a/~dev_rating/media/css/rating.css b/~dev_rating/media/css/rating.css
index 758df85161e8949ca6c7dc2ad8c377eea1528362..433439dc428f2b48ae7733bd17241119d0cf1bb2 100644
--- a/~dev_rating/media/css/rating.css
+++ b/~dev_rating/media/css/rating.css
@@ -146,3 +146,23 @@ div#tdInfo_wrap {
 			display: inline-block;
 			min-width: 100px;
 		}
+
+/* todo */
+.downloadExcelStatement {
+	color: #0183ce;
+	font-weight: bold;
+}
+
+.downloadExcel {
+	margin-left: 30px;
+}
+
+.downloadExcelStatement:hover {
+	color: red;
+	cursor: pointer;
+}
+
+.rate_a, .exam_a {
+	margin-left: 30px;
+}
+/* end todo */
diff --git a/~dev_rating/media/js/rating.js b/~dev_rating/media/js/rating.js
index 835512d2f4695086380909af228b101d69bac2ad..0573bbee95f2068eed6f38635628aea1c07817dd 100644
--- a/~dev_rating/media/js/rating.js
+++ b/~dev_rating/media/js/rating.js
@@ -268,19 +268,36 @@ $(function() {
 
     // Скачать таблицу оценивания в формате excel
     $(".downloadExcel").click(function(){
-        $.fileDownload(URLdir + 'handler/rating/GetExcelRateTable', {
+        $.fileDownload(URLdir + 'handler/FileCreator/GenerateExcelRatingTable', {
             httpMethod: "POST",
             data: 
             {
                 'disciplineID': g_disciplineID
             },
-            successCallback: function (url) {
-                // $('#downloadStudentPDF').removeAttr('disabled');
+            successCallback: function () {
+
+            },
+            failCallback: function () {
+
+            }
+        });
+    });
+
+    // Ведомость в формате excel
+     $('body').on('click', '.downloadExcelStatement', function(){
+        $.fileDownload(URLdir + 'handler/FileCreator/GenerateExcelStatement', {
+            httpMethod: "POST",
+            data: 
+            {
+                "disciplineID": g_disciplineID,
+                "studyGroupID": $(this).attr("id")
+            },
+            successCallback: function () {
+
+            },
+            failCallback: function () {
+
             }
-           // failCallback: function (html, url) {
-           //      $('#downloadStudentPDF').removeAttr('disabled');
-           //      alert(html);
-           // }
         });
     });