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