@@ 908-917 (lines=10) @@ | ||
905 | * |
|
906 | * @param string $stringValue |
|
907 | */ |
|
908 | private function writeStringRecord($stringValue) |
|
909 | { |
|
910 | $record = 0x0207; // Record identifier |
|
911 | $data = \PhpOffice\PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($stringValue); |
|
912 | ||
913 | $length = strlen($data); |
|
914 | $header = pack('vv', $record, $length); |
|
915 | ||
916 | $this->append($header . $data); |
|
917 | } |
|
918 | ||
919 | /** |
|
920 | * Write a hyperlink. |
|
@@ 1815-1834 (lines=20) @@ | ||
1812 | /** |
|
1813 | * Store the header caption BIFF record. |
|
1814 | */ |
|
1815 | private function writeHeader() |
|
1816 | { |
|
1817 | $record = 0x0014; // Record identifier |
|
1818 | ||
1819 | /* removing for now |
|
1820 | // need to fix character count (multibyte!) |
|
1821 | if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) { |
|
1822 | $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string |
|
1823 | } else { |
|
1824 | $str = ''; |
|
1825 | } |
|
1826 | */ |
|
1827 | ||
1828 | $recordData = \PhpOffice\PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader()); |
|
1829 | $length = strlen($recordData); |
|
1830 | ||
1831 | $header = pack('vv', $record, $length); |
|
1832 | ||
1833 | $this->append($header . $recordData); |
|
1834 | } |
|
1835 | ||
1836 | /** |
|
1837 | * Store the footer caption BIFF record. |
|
@@ 1839-1858 (lines=20) @@ | ||
1836 | /** |
|
1837 | * Store the footer caption BIFF record. |
|
1838 | */ |
|
1839 | private function writeFooter() |
|
1840 | { |
|
1841 | $record = 0x0015; // Record identifier |
|
1842 | ||
1843 | /* removing for now |
|
1844 | // need to fix character count (multibyte!) |
|
1845 | if (strlen($this->phpSheet->getHeaderFooter()->getOddFooter()) <= 255) { |
|
1846 | $str = $this->phpSheet->getHeaderFooter()->getOddFooter(); |
|
1847 | } else { |
|
1848 | $str = ''; |
|
1849 | } |
|
1850 | */ |
|
1851 | ||
1852 | $recordData = \PhpOffice\PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter()); |
|
1853 | $length = strlen($recordData); |
|
1854 | ||
1855 | $header = pack('vv', $record, $length); |
|
1856 | ||
1857 | $this->append($header . $recordData); |
|
1858 | } |
|
1859 | ||
1860 | /** |
|
1861 | * Store the horizontal centering HCENTER BIFF record. |