4 include_once
"./Services/Excel/classes/class.ilExcelAdapter.php";
19 $worksheets = array();
22 include_once
'./Services/Excel/PHPExcel/1.7.6/Classes/PHPExcel.php';
25 include_once
'./Services/Excel/PHPExcel/1.7.6/Classes/PHPExcel/Writer/Excel2007.php';
29 $cacheSettings = array();
36 $this->objPHPExcel->getProperties()->setCreator(
"ILIAS Open Source");
37 $this->objPHPExcel->getProperties()->setLastModifiedBy(
"ILIAS Open Source");
38 $this->objPHPExcel->getProperties()->setTitle($this->strFormKey);
39 $this->objPHPExcel->getProperties()->setSubject($this->strFormKey);
40 $this->objPHPExcel->getProperties()->setDescription($this->strFormKey);
41 $this->objPHPExcel->getProperties()->setKeywords(
"Office 2007 ILIAS Open Source");
42 $this->objPHPExcel->getProperties()->setCategory(
"wcms data storage");
44 $this->objPHPExcel->setActiveSheetIndex(0);
49 include_once
"./Services/Utilities/classes/class.ilUtil.php";
52 $objWriter->save($tempname);
58 $tempname = $this->
save();
59 header(
'Content-Type: appplication/excel');
60 header(
'Content-Transfer-Encoding: binary');
61 header(
'Content-Disposition: attachment; filename="' . $outputfilename .
'"');
62 header(
'Cache-Control: must-revalidate, post-check=0, pre-check=0');
63 header(
'Pragma: public');
65 print file_get_contents($tempname);
72 return $this->objPHPExcel->getSheetCount();
77 $this->objPHPExcel->setActiveSheetIndex($index);
84 $this->objPHPExcel->getActiveSheet()->setTitle(substr(
$title, 0, 31));
94 if (strcmp($width,
'auto') == 0)
96 $this->objPHPExcel->getActiveSheet()->getColumnDimension($this->
getCellTitle($columnindex))->setAutoSize(
true);
100 $this->objPHPExcel->getActiveSheet()->getColumnDimension($this->
getCellTitle($columnindex))->setWidth($width);
106 $objWorksheet = $this->objPHPExcel->createSheet();
109 $objWorksheet->setTitle(substr(
$title, 0, 31));
115 return $objWorksheet;
121 $this->objPHPExcel->getActiveSheet()->setCellValue($cell, $value);
131 $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getNumberFormat()->setFormatCode(
'hh:mm');
134 $this->objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($this->
formatCellTitle());
137 $this->objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($this->
formatCellCenter());
140 $this->objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($this->
formatCellBold());
163 'alignment' => array(
178 'alignment' => array(
205 'alignment' => array(
219 return chr(65 + $index);
220 } elseif ($index < 702) {
221 return chr(64 + ($index / 26)).chr(65 + $index % 26);
223 return chr(64 + (($index - 26) / 676)).chr(65 + ((($index - 26) % 676) / 26)).chr(65 + $index % 26);