@@ 1002-1013 (lines=12) @@ | ||
999 | * @param string $format Custom format string |
|
1000 | * @param integer $ifmt Format index code |
|
1001 | */ |
|
1002 | private function writeNumberFormat($format, $ifmt) |
|
1003 | { |
|
1004 | $record = 0x041E; // Record identifier |
|
1005 | ||
1006 | $numberFormatString = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($format); |
|
1007 | $length = 2 + strlen($numberFormatString); // Number of bytes to follow |
|
1008 | ||
1009 | ||
1010 | $header = pack("vv", $record, $length); |
|
1011 | $data = pack("v", $ifmt) . $numberFormatString; |
|
1012 | $this->append($header . $data); |
|
1013 | } |
|
1014 | ||
1015 | /** |
|
1016 | * Write DATEMODE record to indicate the date system in use (1904 or 1900). |
|
@@ 1063-1074 (lines=12) @@ | ||
1060 | * |
|
1061 | * @param string $sheetname Worksheet name |
|
1062 | */ |
|
1063 | private function writeExternalSheet($sheetname) |
|
1064 | { |
|
1065 | $record = 0x0017; // Record identifier |
|
1066 | $length = 0x02 + strlen($sheetname); // Number of bytes to follow |
|
1067 | ||
1068 | $cch = strlen($sheetname); // Length of sheet name |
|
1069 | $rgch = 0x03; // Filename encoding |
|
1070 | ||
1071 | $header = pack("vv", $record, $length); |
|
1072 | $data = pack("CC", $cch, $rgch); |
|
1073 | $this->append($header . $data . $sheetname); |
|
1074 | } |
|
1075 | ||
1076 | /** |
|
1077 | * Store the NAME record in the short format that is used for storing the print |