Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php
private function writeMarginRight()
    {
        $record = 0x0027; // Record identifier
        $length = 0x0008; // Bytes to follow

        $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches

        $header = pack('vv', $record, $length);
        $data = pack('d', $margin);
        if (self::getByteOrder()) { // if it's Big Endian
            $data = strrev($data);
        }

        $this->append($header . $data);
    }
private function writeMarginRight()
    {
        $record = 0x0027; // Record identifier
        $length = 0x0008; // Bytes to follow

        $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches

        $header = pack('vv', $record, $length);
        $data = pack('d', $margin);
        if (self::getByteOrder()) { // if it's Big Endian
            $data = strrev($data);
        }

        $this->append($header . $data);
    }
Store the RIGHTMARGIN BIFF record.