private function PHPExcel_Writer_Excel5_Worksheet::_writeRow in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php \PHPExcel_Writer_Excel5_Worksheet::_writeRow()
* This method is used to set the height and format for a row. * *
Parameters
integer $row The row to set: * @param integer $height Height we are giving to the row. * Use null to set XF without setting height * @param integer $xfIndex The optional cell style Xf index to apply to the columns * @param bool $hidden The optional hidden attribute * @param integer $level The optional outline level for row, in range [0,7]
1 call to PHPExcel_Writer_Excel5_Worksheet::_writeRow()
- PHPExcel_Writer_Excel5_Worksheet::close in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Worksheet.php - * Add data to the beginning of the workbook (note the reverse order) * and to the end of the workbook. * * @access public *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Worksheet.php, line 1219
Class
- PHPExcel_Writer_Excel5_Worksheet
- PHPExcel_Writer_Excel5_Worksheet
Code
private function _writeRow($row, $height, $xfIndex, $hidden = false, $level = 0) {
$record = 0x208;
// Record identifier
$length = 0x10;
// Number of bytes to follow
$colMic = 0x0;
// First defined column
$colMac = 0x0;
// Last defined column
$irwMac = 0x0;
// Used by Excel to optimise loading
$reserved = 0x0;
// Reserved
$grbit = 0x0;
// Option flags
$ixfe = $xfIndex;
if ($height < 0) {
$height = null;
}
// Use _writeRow($row, null, $XF) to set XF format without setting height
if ($height != null) {
$miyRw = $height * 20;
// row height
}
else {
$miyRw = 0xff;
// default row height is 256
}
// Set the options flags. fUnsynced is used to show that the font and row
// heights are not compatible. This is usually the case for WriteExcel.
// The collapsed flag 0x10 doesn't seem to be used to indicate that a row
// is collapsed. Instead it is used to indicate that the previous row is
// collapsed. The zero height flag, 0x20, is used to collapse a row.
$grbit |= $level;
if ($hidden) {
$grbit |= 0x30;
}
if ($height !== null) {
$grbit |= 0x40;
// fUnsynced
}
if ($xfIndex !== 0xf) {
$grbit |= 0x80;
}
$grbit |= 0x100;
$header = pack("vv", $record, $length);
$data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe);
$this
->_append($header . $data);
}