Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00035 include_once './classes/Spreadsheet/Excel/Writer.php';
00036
00037 class ilPaymentExcelWriterAdapter
00038 {
00039 var $workbook = null;
00040
00041 var $format_bold = null;
00042 var $format_header = null;
00043
00044 function ilPaymentExcelWriterAdapter($a_filename,$a_send = true)
00045 {
00046 if($a_send)
00047 {
00048 $this->workbook =& new Spreadsheet_Excel_Writer();
00049 $this->workbook->send($a_filename);
00050 }
00051 else
00052 {
00053 $this->workbook =& new Spreadsheet_Excel_Writer($a_filename);
00054 }
00055 $this->__initFormatBold();
00056 $this->__initFormatHeader();
00057 $this->__initFormatTitle();
00058 }
00059
00060 function &getWorkbook()
00061 {
00062 return $this->workbook;
00063 }
00064
00065 function &getFormatBold()
00066 {
00067 return $this->format_bold;
00068 }
00069 function &getFormatHeader()
00070 {
00071 return $this->format_header;
00072 }
00073 function &getFormatTitle()
00074 {
00075 return $this->format_title;
00076 }
00077 function &getFormatDate()
00078 {
00079 return $this->format_date;
00080 }
00081
00082
00083 function __initFormatBold()
00084 {
00085 $this->format_bold =& $this->workbook->addFormat();
00086 $this->format_bold->setBold();
00087 }
00088 function __initFormatHeader()
00089 {
00090 $this->format_header =& $this->workbook->addFormat();
00091 $this->format_header->setBold();
00092 $this->format_header->setTop(100);
00093 $this->format_header->setColor('black');
00094 $this->format_header->setPattern(1);
00095 $this->format_header->setFgColor('silver');
00096 }
00097 function __initFormatTitle()
00098 {
00099 $this->format_title =& $this->workbook->addFormat();
00100 $this->format_title->setBold();
00101 $this->format_title->setColor('black');
00102 $this->format_title->setPattern(1);
00103 $this->format_title->setSize(16);
00104 $this->format_title->setAlign('center');
00105 }
00106 function __initFormatDate()
00107 {
00108 $this->format_date =& $this->workbook->addFormat();
00109 $this->format_date->setNumFormat("YYYY-MM-DD hh:mm:ss");
00110 }
00111
00112
00113 }
00114 ?>