Révision 01f36513
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/webform/includes/exporters/webform_exporter_excel_xlsx.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 | 3 |
/** |
4 |
* @file |
|
5 | 4 |
* This exporter creates an XLSX file readable by newer versions of Excel. |
6 | 5 |
*/ |
7 |
|
|
8 |
/** |
|
9 |
* |
|
10 |
*/ |
|
11 | 6 |
class webform_exporter_excel_xlsx extends webform_exporter { |
12 | 7 |
/** |
13 | 8 |
* Regular expression that checks for a valid ISO 8601 date/time. |
... | ... | |
17 | 12 |
const DATE_REGEX_TIME = '/^(([T \s]?(\d{2}))(:(\d{2}))(:(\d{2}))?)?$/'; |
18 | 13 |
|
19 | 14 |
/** |
20 |
* |
|
15 |
* {@inheritdoc}
|
|
21 | 16 |
*/ |
22 |
public function add_row(&$file_handle, $data, $row_count) { |
|
17 |
public function add_row(&$file_handle, array $data, $row_count) {
|
|
23 | 18 |
$row = $row_count + 1; |
24 | 19 |
$col = 'A'; |
25 | 20 |
|
... | ... | |
148 | 143 |
} |
149 | 144 |
|
150 | 145 |
/** |
151 |
* |
|
146 |
* {@inheritdoc}
|
|
152 | 147 |
*/ |
153 | 148 |
public function post_process(&$results) { |
154 | 149 |
// Our download file is currently a single XML sheet file. We need to add |
... | ... | |
191 | 186 |
} |
192 | 187 |
|
193 | 188 |
/** |
194 |
* |
|
189 |
* {@inheritdoc}
|
|
195 | 190 |
*/ |
196 | 191 |
public function set_headers($filename) { |
197 | 192 |
drupal_add_http_header('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); |
Formats disponibles : Unified diff
Weekly update of contrib modules