File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 8
8
* [ ems_store_save] ( #ems_store_save )
9
9
* [ ems_store_delete] ( #ems_store_delete )
10
10
* [ ems_flash] ( #ems_flash )
11
+ * [ ems_file_reader_data] ( #ems_file_reader_data )
12
+ * [ ems_file_reader_cells] ( #ems_file_reader_cells )
11
13
* [ Twig filters] ( #twig-filters )
12
14
* [ ems_anti_spam] ( #ems_anti_spam )
13
15
* [ ems_html_encode] ( #ems_html_encode )
@@ -205,6 +207,34 @@ You can use the following template for displaying the flashes (bootstrap5).
205
207
{%- endfor -%}
206
208
` ` `
207
209
210
+ # # ems_file_reader_data
211
+
212
+ Use the FileReader to get CSV or MS Excel fil content.
213
+
214
+ ` ` ` twig
215
+ <pre>{{ ems_file_reader_data('57bcba09d6f5e06852b83b2b2ba545529f862a87', {'all_sheets': true})|json_encode(constant('JSON_PRETTY_PRINT')) }}</pre>
216
+ ` ` `
217
+
218
+ Options :
219
+ * `delimiter` (string): For CSV file
220
+ * `encoding` (string): file's charset
221
+ * `all_sheets` (boolean): Extract only the active sheet (false, default) or all sheets (true)
222
+
223
+ # # ems_file_reader_cells
224
+
225
+ Returns a cells iterator
226
+
227
+ ` ` ` twig
228
+ <pre>{% set cellsIterator = ems_file_reader_cells('57bcba09d6f5e06852b83b2b2ba545529f862a87', {'exclude_rows': [0]}) }}</pre>
229
+ ` ` `
230
+ Options :
231
+ * `mime_type` (string): File mimetype
232
+ * `delimiter` (string): CSV delimiter
233
+ * `encoding` (string): file's charset
234
+ * `exclude_rows` (int[]): skip those rows
235
+ * `limit` (int): limit to the first rows
236
+
237
+
208
238
# Twig filters
209
239
210
240
# # ems_anti_spam
You can’t perform that action at this time.
0 commit comments