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
00036 class ilPaymentExcelWriterAdapter
00037 {
00038 var $workbook = null;
00039
00040 var $format_bold = null;
00041 var $format_header = null;
00042
00043 function ilPaymentExcelWriterAdapter($a_filename,$a_send = true)
00044 {
00045 $result = @include_once 'Spreadsheet/Excel/Writer.php';
00046 if (!$result)
00047 {
00048 include_once './classes/Spreadsheet/Excel/Writer.php';
00049 }
00050 if($a_send)
00051 {
00052 $this->workbook =& new Spreadsheet_Excel_Writer();
00053 $this->workbook->send($a_filename);
00054 }
00055 else
00056 {
00057 $this->workbook =& new Spreadsheet_Excel_Writer($a_filename);
00058 }
00059 $this->__initFormatBold();
00060 $this->__initFormatHeader();
00061 $this->__initFormatTitle();
00062 }
00063
00064 function &getWorkbook()
00065 {
00066 return $this->workbook;
00067 }
00068
00069 function &getFormatBold()
00070 {
00071 return $this->format_bold;
00072 }
00073 function &getFormatHeader()
00074 {
00075 return $this->format_header;
00076 }
00077 function &getFormatTitle()
00078 {
00079 return $this->format_title;
00080 }
00081 function &getFormatDate()
00082 {
00083 return $this->format_date;
00084 }
00085
00086
00087 function __initFormatBold()
00088 {
00089 $this->format_bold =& $this->workbook->addFormat();
00090 $this->format_bold->setBold();
00091 }
00092 function __initFormatHeader()
00093 {
00094 $this->format_header =& $this->workbook->addFormat();
00095 $this->format_header->setBold();
00096 $this->format_header->setTop(100);
00097 $this->format_header->setColor('black');
00098 $this->format_header->setPattern(1);
00099 $this->format_header->setFgColor('silver');
00100 }
00101 function __initFormatTitle()
00102 {
00103 $this->format_title =& $this->workbook->addFormat();
00104 $this->format_title->setBold();
00105 $this->format_title->setColor('black');
00106 $this->format_title->setPattern(1);
00107 $this->format_title->setSize(16);
00108 $this->format_title->setAlign('center');
00109 }
00110 function __initFormatDate()
00111 {
00112 $this->format_date =& $this->workbook->addFormat();
00113 $this->format_date->setNumFormat("YYYY-MM-DD hh:mm:ss");
00114 }
00115
00116
00117 }
00118 ?>