You are here

private function PHPExcel_Writer_Excel5_Worksheet::_writeLabelSst in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php \PHPExcel_Writer_Excel5_Worksheet::_writeLabelSst()

* Write a string to the specified row and column (zero indexed). * This is the BIFF8 version (no 255 chars limit). * $format is optional. * Returns 0 : normal termination * -2 : row or column out of range * -3 : long string truncated to 255 chars * * @access public *

Parameters

integer $row Zero indexed row: * @param integer $col Zero indexed column * @param string $str The string to write * @param mixed $xfIndex The XF format index for the cell * @return integer

1 call to PHPExcel_Writer_Excel5_Worksheet::_writeLabelSst()
PHPExcel_Writer_Excel5_Worksheet::_writeString in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php
* Write a LABELSST record or a LABEL record. Which one depends on BIFF version * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php, line 755

Class

PHPExcel_Writer_Excel5_Worksheet
PHPExcel_Writer_Excel5_Worksheet

Code

private function _writeLabelSst($row, $col, $str, $xfIndex) {
  $record = 0xfd;

  // Record identifier
  $length = 0xa;

  // Bytes to follow
  $str = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($str);

  /* check if string is already present */
  if (!isset($this->_str_table[$str])) {
    $this->_str_table[$str] = $this->_str_unique++;
  }
  $this->_str_total++;
  $header = pack('vv', $record, $length);
  $data = pack('vvvV', $row, $col, $xfIndex, $this->_str_table[$str]);
  $this
    ->_append($header . $data);
}