/**
  * Class constructor
  *
  * @param string filename for storing the workbook. "-" for writing to stdout.
  * @access public
  */
 public function __construct($filename)
 {
     // It needs to call its parent's constructor explicitly
     parent::__construct();
     $this->_filename = $filename;
     $this->_parser = new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
     $this->_1904 = 0;
     $this->_activesheet = 0;
     $this->_firstsheet = 0;
     $this->_selected = 0;
     $this->_xf_index = 16;
     // 15 style XF's and 1 cell XF.
     $this->_fileclosed = 0;
     $this->_biffsize = 0;
     $this->_sheetname = 'Sheet';
     $this->_tmp_format = new Spreadsheet_Excel_Writer_Format($this->_BIFF_version);
     $this->_worksheets = array();
     $this->_sheetnames = array();
     $this->_formats = array();
     $this->_palette = array();
     $this->_codepage = 0x4e4;
     // FIXME: should change for BIFF8
     $this->_country_code = -1;
     $this->_string_sizeinfo = 3;
     // Add the default format for hyperlinks
     $this->_url_format = $this->addFormat(array('color' => 'blue', 'underline' => 1));
     $this->_str_total = 0;
     $this->_str_unique = 0;
     $this->_str_table = array();
     $this->_timestamp = time();
     $this->_setPaletteXl97();
 }
Example #2
0
 /**
  * Store Worksheet data in memory using the parent's class append() or to a
  * temporary file, the default.
  *
  * @access private
  * @param string $data The binary data to append
  */
 function _append($data)
 {
     if ($this->_using_tmpfile) {
         // Add CONTINUE records if necessary
         if (strlen($data) > $this->_limit) {
             $data = $this->_addContinue($data);
         }
         fwrite($this->_filehandle, $data);
         $this->_datasize += strlen($data);
     } else {
         parent::_append($data);
     }
 }
 /**
  * Class constructor
  *
  * @param string $fileName for storing the workbook. "-" for writing to stdout.
  * @access public
  */
 public function __construct($fileName)
 {
     // It needs to call its parent's constructor explicitly
     parent::__construct();
     $this->fileName = $fileName;
     $this->parser = new Spreadsheet_Excel_Writer_Parser($this->byteOrder, $this->BIFF_version);
     $this->flagFor1904 = 0;
     $this->activeSheet = 0;
     $this->firstSheet = 0;
     $this->selectedWorkBook = 0;
     $this->xf_index = 16;
     // 15 style XF's and 1 cell XF.
     $this->fileIsClosed = 0;
     $this->biffSize = 0;
     $this->sheetName = 'Sheet';
     $this->temporaryFormat = new Spreadsheet_Excel_Writer_Format($this->BIFF_version);
     $this->workSheet = array();
     $this->sheetNames = array();
     $this->formats = array();
     $this->palette = array();
     $this->codePage = 0x4e4;
     // FIXME: should change for BIFF8
     $this->countryCode = -1;
     $this->stringSizeInfo = 3;
     // Add the default format for hyperlinks
     $this->urlFormat = $this->addFormat(array('color' => 'blue', 'underline' => 1));
     $this->totalStringLength = 0;
     $this->uniqueString = 0;
     $this->tableOfStrings = array();
     $this->setPaletteXl97();
 }