Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php
private function writeWindow2()
    {
        $record = 0x023E; // Record identifier
        $length = 0x0012;

        $grbit = 0x00B6; // Option flags
        $rwTop = 0x0000; // Top row visible in window
        $colLeft = 0x0000; // Leftmost column visible in window

        // The options flags that comprise $grbit
        $fDspFmla = 0; // 0 - bit
        $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1
        $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2
        $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3
        $fDspZeros = 1; // 4
        $fDefaultHdr = 1; // 5
        $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6
        $fDspGuts = $this->outlineOn; // 7
        $fFrozenNoSplit = 0; // 0 - bit
        // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet
        $fSelected = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0;
        $fPaged = 1; // 2
        $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW;

        $grbit = $fDspFmla;
        $grbit |= $fDspGrid << 1;
        $grbit |= $fDspRwCol << 2;
        $grbit |= $fFrozen << 3;
        $grbit |= $fDspZeros << 4;
        $grbit |= $fDefaultHdr << 5;
        $grbit |= $fArabic << 6;
        $grbit |= $fDspGuts << 7;
        $grbit |= $fFrozenNoSplit << 8;
        $grbit |= $fSelected << 9;
        $grbit |= $fPaged << 10;
        $grbit |= $fPageBreakPreview << 11;

        $header = pack('vv', $record, $length);
        $data = pack('vvv', $grbit, $rwTop, $colLeft);

        // FIXME !!!
        $rgbHdr = 0x0040; // Row/column heading and gridline color index
        $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000);
        $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal();

        $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000);

        $this->append($header . $data);
    }
private function writeWindow2()
    {
        $record = 0x023E; // Record identifier
        $length = 0x0012;

        $grbit = 0x00B6; // Option flags
        $rwTop = 0x0000; // Top row visible in window
        $colLeft = 0x0000; // Leftmost column visible in window

        // The options flags that comprise $grbit
        $fDspFmla = 0; // 0 - bit
        $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1
        $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2
        $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3
        $fDspZeros = 1; // 4
        $fDefaultHdr = 1; // 5
        $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6
        $fDspGuts = $this->outlineOn; // 7
        $fFrozenNoSplit = 0; // 0 - bit
        // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet
        $fSelected = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0;
        $fPaged = 1; // 2
        $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW;

        $grbit = $fDspFmla;
        $grbit |= $fDspGrid << 1;
        $grbit |= $fDspRwCol << 2;
        $grbit |= $fFrozen << 3;
        $grbit |= $fDspZeros << 4;
        $grbit |= $fDefaultHdr << 5;
        $grbit |= $fArabic << 6;
        $grbit |= $fDspGuts << 7;
        $grbit |= $fFrozenNoSplit << 8;
        $grbit |= $fSelected << 9;
        $grbit |= $fPaged << 10;
        $grbit |= $fPageBreakPreview << 11;

        $header = pack('vv', $record, $length);
        $data = pack('vvv', $grbit, $rwTop, $colLeft);

        // FIXME !!!
        $rgbHdr = 0x0040; // Row/column heading and gridline color index
        $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000);
        $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal();

        $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000);

        $this->append($header . $data);
    }
private function writeWindow2 ( ) { $ record = 0x023E ; // Record identifier $ length = 0x0012 ; $ grbit = 0x00B6 ; // Option flags $ rwTop = 0x0000 ; // Top row visible in window $ colLeft = 0x0000 ; // Leftmost column visible in window // The options flags that comprise $grbit $ fDspFmla = 0 ; // 0 - bit $ fDspGrid = $ this -> phpSheet -> getShowGridlines ( ) ? 1 : 0 ; // 1 $ fDspRwCol = $ this -> phpSheet -> getShowRowColHeaders ( ) ? 1 : 0 ; // 2 $ fFrozen = $ this -> phpSheet -> getFreezePane ( ) ? 1 : 0 ; // 3 $ fDspZeros = 1 ; // 4 $ fDefaultHdr = 1 ; // 5 $ fArabic = $ this -> phpSheet -> getRightToLeft ( ) ? 1 : 0 ; // 6 $ fDspGuts = $ this -> outlineOn ; // 7 $ fFrozenNoSplit = 0 ; // 0 - bit // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet $ fSelected = ( $ this -> phpSheet === $ this -> phpSheet -> getParent ( ) -> getActiveSheet ( ) ) ? 1 : 0 ; $ fPaged = 1 ; // 2 $ fPageBreakPreview = $ this -> phpSheet -> getSheetView ( ) -> getView ( ) === SheetView :: SHEETVIEW_PAGE_BREAK_PREVIEW ; $ grbit = $ fDspFmla ; $ grbit |= $ fDspGrid << 1 ; $ grbit |= $ fDspRwCol << 2 ; $ grbit |= $ fFrozen << 3 ; $ grbit |= $ fDspZeros << 4 ; $ grbit |= $ fDefaultHdr << 5 ; $ grbit |= $ fArabic << 6 ; $ grbit |= $ fDspGuts << 7 ; $ grbit |= $ fFrozenNoSplit << 8 ; $ grbit |= $ fSelected << 9 ; $ grbit |= $ fPaged << 10 ; $ grbit |= $ fPageBreakPreview << 11 ; $ header = pack ( 'vv' , $ record , $ length ) ; $ data = pack ( 'vvv' , $ grbit , $ rwTop , $ colLeft ) ; // FIXME !!! $ rgbHdr = 0x0040 ; // Row/column heading and gridline color index $ zoom_factor_page_break = ( $ fPageBreakPreview ? $ this -> phpSheet -> getSheetView ( ) -> getZoomScale ( ) : 0x0000 ) ; $ zoom_factor_normal = $ this -> phpSheet -> getSheetView ( ) -> getZoomScaleNormal ( ) ; $ data .= pack ( 'vvvvV' , $ rgbHdr , 0x0000 , $ zoom_factor_page_break , $ zoom_factor_normal , 0x00000000 ) ; $ this -> append ( $ header . $ data ) ; }
Write BIFF record Window2.
Write BIFF record Window2 .