1 | <?php |
||
8 | class ExcelHelper |
||
9 | { |
||
10 | /** |
||
11 | * @link http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010073849.aspx |
||
12 | * XFE1048577 |
||
13 | */ |
||
14 | const EXCEL_MAX_ROW = 1048576; |
||
15 | const EXCEL_MAX_RANGE = 2147483647; |
||
16 | const EXCEL_MAX_COL = 16384; |
||
17 | |||
18 | /** |
||
19 | * @param string $dateInput |
||
20 | * |
||
21 | * @return mixed |
||
22 | */ |
||
23 | public static function convertDateTime($dateInput) |
||
57 | |||
58 | /** |
||
59 | * @param $year |
||
60 | * @param $month |
||
61 | * @param $day |
||
62 | * @param $dayCheck |
||
63 | * |
||
64 | * @return bool |
||
65 | */ |
||
66 | private function checkEpoch($year, $month, $day, $dayCheck) |
||
74 | |||
75 | /** |
||
76 | * @param $val |
||
77 | * |
||
78 | * @return mixed |
||
79 | */ |
||
80 | public static function xmlspecialchars($val) |
||
84 | |||
85 | /** |
||
86 | * @param int $rowNumber |
||
87 | * @param int $columnNumber |
||
88 | * |
||
89 | * @return string Cell label/coordinates (A1, C3, AA42) |
||
90 | */ |
||
91 | public static function xlsCell($rowNumber, $columnNumber) |
||
100 | |||
101 | /** |
||
102 | * @link https://msdn.microsoft.com/ru-RU/library/aa365247%28VS.85%29.aspx |
||
103 | * |
||
104 | * @param string $filename |
||
105 | * |
||
106 | * @return mixed |
||
107 | */ |
||
108 | public static function checkFilename($filename) |
||
117 | |||
118 | /** |
||
119 | * @todo check escaping |
||
120 | * |
||
121 | * @param string $cellFormat |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public static function escapeCellFormat($cellFormat) |
||
154 | |||
155 | /** |
||
156 | * @param $dateTime |
||
157 | * |
||
158 | * @return float|int |
||
159 | */ |
||
160 | private function getSeconds($dateTime) |
||
170 | } |
||
171 |