@@ 1028-1038 (lines=11) @@ | ||
1025 | * @param string $format Custom format string |
|
1026 | * @param int $ifmt Format index code |
|
1027 | */ |
|
1028 | private function writeNumberFormat($format, $ifmt) |
|
1029 | { |
|
1030 | $record = 0x041E; // Record identifier |
|
1031 | ||
1032 | $numberFormatString = StringHelper::UTF8toBIFF8UnicodeLong($format); |
|
1033 | $length = 2 + strlen($numberFormatString); // Number of bytes to follow |
|
1034 | ||
1035 | $header = pack('vv', $record, $length); |
|
1036 | $data = pack('v', $ifmt) . $numberFormatString; |
|
1037 | $this->append($header . $data); |
|
1038 | } |
|
1039 | ||
1040 | /** |
|
1041 | * Write DATEMODE record to indicate the date system in use (1904 or 1900). |
|
@@ 1088-1099 (lines=12) @@ | ||
1085 | * |
|
1086 | * @param string $sheetname Worksheet name |
|
1087 | */ |
|
1088 | private function writeExternalSheet($sheetname) |
|
1089 | { |
|
1090 | $record = 0x0017; // Record identifier |
|
1091 | $length = 0x02 + strlen($sheetname); // Number of bytes to follow |
|
1092 | ||
1093 | $cch = strlen($sheetname); // Length of sheet name |
|
1094 | $rgch = 0x03; // Filename encoding |
|
1095 | ||
1096 | $header = pack('vv', $record, $length); |
|
1097 | $data = pack('CC', $cch, $rgch); |
|
1098 | $this->append($header . $data . $sheetname); |
|
1099 | } |
|
1100 | ||
1101 | /** |
|
1102 | * Store the NAME record in the short format that is used for storing the print |