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) |
||
61 | |||
62 | /** |
||
63 | * @param $year |
||
64 | * @param $month |
||
65 | * @param $day |
||
66 | * @param $dayCheck |
||
67 | * |
||
68 | * @return bool |
||
69 | */ |
||
70 | private function checkEpoch($year, $month, $day, $dayCheck) |
||
78 | |||
79 | /** |
||
80 | * @param $val |
||
81 | * |
||
82 | * @return mixed |
||
83 | */ |
||
84 | public static function xmlspecialchars($val) |
||
88 | |||
89 | /** |
||
90 | * @param int $rowNumber |
||
91 | * @param int $columnNumber |
||
92 | * |
||
93 | * @return string Cell label/coordinates (A1, C3, AA42) |
||
94 | */ |
||
95 | public static function xlsCell($rowNumber, $columnNumber) |
||
104 | |||
105 | /** |
||
106 | * @link https://msdn.microsoft.com/ru-RU/library/aa365247%28VS.85%29.aspx |
||
107 | * |
||
108 | * @param string $filename |
||
109 | * |
||
110 | * @return mixed |
||
111 | */ |
||
112 | public static function checkFilename($filename) |
||
121 | |||
122 | /** |
||
123 | * @todo check escaping |
||
124 | * |
||
125 | * @param string $cellFormat |
||
126 | * |
||
127 | * @return string |
||
128 | */ |
||
129 | public static function escapeCellFormat($cellFormat) |
||
158 | } |
||
159 |