# How do I import data from Excel to getImageList?

**URL:** <https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385>\
**Category:** Random\
**Created:** [January 3, 2024, 6:25am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385 "2024-01-03T06:25:10Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcv11111](https://community.modx.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mcv11111](https://community.modx.com/u/mcv11111)\
**Post date:** [January 3, 2024, 6:25am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/1 "2024-01-03T06:25:10Z")

</div>

Hi. Tell me, what are the options for importing data from Excel to getImageList?

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [January 3, 2024, 8:34am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/2 "2024-01-03T08:34:20Z")

</div>

_getImageList_ is the snippet to output MIGX data to the front-end.

To import data for **MIGX** , there exists an action-button “importcsvmigx”.  
In the MIGX configuration, go to the tab “Actionbuttons” and select the checkbox “importcsvmigx”.

Save you Excel data as a CSV (comma-separated values) file, so it can be imported.

---

<div class="post-metadata">

**Author:** ![mcv11111](https://community.modx.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mcv11111](https://community.modx.com/u/mcv11111)\
**Post date:** [January 3, 2024, 8:59am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/3 "2024-01-03T08:59:06Z")

</div>

Hello. In migx, I don’t see any configurations created.

 ![2024-01-03_135354](https://modx-community.s3.dualstack.us-east-1.amazonaws.com/original/2X/0/06febd8a961e6b69d8ed5c7ba353221cbce8fae9.png)  
The page template has

```auto
 [[!getImageList? 
                                &tvname=`price_category_2`
                                &tpl=`price_choise`
                                &docid=`[[*id]]`
                             ]]

```

TV price\_category\_2

 ![2024-01-03_135840](https://modx-community.s3.dualstack.us-east-1.amazonaws.com/original/2X/f/f681230d09d126446ee7fb28209b90f3ef752281.png)

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [January 3, 2024, 9:38am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/4 "2024-01-03T09:38:30Z")

</div>

You defined your MIGX TV directly in the TV (fields “Form Tabs” and “Grid Columns” in the tab “Input Options”).  
I don’t think you can add the “Import”-Button this way.

Define the MIGX fields and columns by creating a new MIGX configuration (menu “Extras” → “MIGX”). Then in your TV, use the field “Configurations” to reference the created configuration (instead of using the fields “Form Tabs” and “Grid Columns”).

---

<div class="post-metadata">

**Author:** ![mcv11111](https://community.modx.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mcv11111](https://community.modx.com/u/mcv11111)\
**Post date:** [January 13, 2024, 9:03am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/5 "2024-01-13T09:03:41Z")

</div>

good afternoon. thanks

---

<div class="post-metadata">

**Author:** ![terrybarth](https://community.modx.com/user_avatar/community.modx.com/terrybarth/32/347_2.png) [@terrybarth](https://community.modx.com/u/terrybarth)\
**Post date:** [January 4, 2025, 6:41pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/6 "2025-01-04T18:41:46Z")

</div>

I’m trying to import some csv data into MIGX. There seems to be no tutorial, step by step on this, but I did finally find this topic. I think I’m pretty close but it’s not yet working.

I want to create a very simple glossary with just two fields, “Term” and “Definition”. I’ve created a configuration called “glossary” where I’ve set up the formtabs and columns. I’ve also added a action button called importcsvmigx. I’ve left all other fields blank.

I’ve created a MIGX tv where I’ve specified the “glossary” configuation in lieu of the formtabs and grid columns directly in the tv.

I’ve manually added a couple of terms and definitions on the resource where I’ve assigned the MIGX tv so I know the tv configuration is working. The import csv button is available and when I click on it I can navigate to the csv file.

The csv file has the field names in the first row of the file and two rows of data.

When I select the file and click OK. Nothing happens. I feel like I’m really close on this, but clearly missing something.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [January 6, 2025, 11:11am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/7 "2025-01-06T11:11:11Z")

</div>

When I test it, there is an error `... fopen(glossary.csv): failed to open stream: No such file or directory` in the MODX error log (and lots of subsequent errors).

It helps (in my case) when I change the import processor here

> <https://github.com/Bruno17/MIGX/blob/dfcd8c691064a5b3201953669d49b4cb95c7cbdd/core/components/migx/processors/mgr/default/importcsvmigx.php#L65>

to add the MODX base path to the (relative) CSV file path:

```php
$result = parse_csv_file(MODX_BASE_PATH . $pathname, $config);

```

---

<div class="post-metadata">

**Author:** ![terrybarth](https://community.modx.com/user_avatar/community.modx.com/terrybarth/32/347_2.png) [@terrybarth](https://community.modx.com/u/terrybarth)\
**Post date:** [January 6, 2025, 3:37pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/8 "2025-01-06T15:37:13Z")

</div>

Brilliant! That did the trick.

Thank you so much.

Is that something that needs to be patched?

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [January 6, 2025, 4:32pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/9 "2025-01-06T16:32:06Z")

</div>

> [@terrybarth](#):
>
> Is that something that needs to be patched?

It looks like the same code works correctly on MODX 2.x (but creates the error on MODX 3).

I have to take a closer look at the code to see why.  
If I find a solution that works for both MODX 2 and 3, I will create a PR on Github.

---

<div class="post-metadata">

**Author:** ![terrybarth](https://community.modx.com/user_avatar/community.modx.com/terrybarth/32/347_2.png) [@terrybarth](https://community.modx.com/u/terrybarth)\
**Post date:** [January 6, 2025, 5:51pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/10 "2025-01-06T17:51:50Z")

</div>

That would be great. Thank you!

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [January 7, 2025, 9:55am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/11 "2025-01-07T09:55:58Z")

</div>

I created a pull request with a solution that is a bit different.

> <https://github.com/Bruno17/MIGX/pull/437>
>
> The action-button "importcsvmigx" doesn't work correctly in MODX 3, because the …file path that \`modx-browser\` returns is not an absolute path anymore.
> 
> \---
> 
> Related topic in the MODX forum:
> https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/6

The quick fix I posted above only works, if the CSV file is selected in the default “Filesystem” media source.

---

<div class="post-metadata">

**Author:** ![terrybarth](https://community.modx.com/user_avatar/community.modx.com/terrybarth/32/347_2.png) [@terrybarth](https://community.modx.com/u/terrybarth)\
**Post date:** [January 7, 2025, 3:32pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/12 "2025-01-07T15:32:14Z")

</div>

Excellent! Thank you.

After this is implemented and I upgrade MIGX, will this will replace the “fix” you gave me earlier?

---

<div class="post-metadata">

**Author:** ![Azazerus25](https://community.modx.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@Azazerus25](https://community.modx.com/u/Azazerus25)\
**Post date:** [August 10, 2025, 12:37pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/13 "2025-08-10T12:37:01Z")

</div>

Hello. Could you please describe in more detail how to import data from csv to a table. I have created a configuration, but when I load the csv, the rows appear in the table, but there are no values.

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [August 10, 2025, 2:21pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/14 "2025-08-10T14:21:07Z")

</div>

Can you provide more information about your setup:

- How does your CSV file look? Does the first line contain the names of the columns?
- What’s your MIGX configuration file? (You can export it by right-clicking on the config → “Export/Import” → and copying the JSON from the field.)
- (What versions of MIGX, MODX, PHP do you use?)

---

<div class="post-metadata">

**Author:** ![Azazerus25](https://community.modx.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@Azazerus25](https://community.modx.com/u/Azazerus25)\
**Post date:** [August 10, 2025, 3:15pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/15 "2025-08-10T15:15:25Z")

</div>

The csv file contains in the first line the names of the columns that correspond to the Field field.  
Example csv:  
tream;descr  
ssave;text  
two;text\_2

Version Modx v3.1.1  
php v.8.2.12  
MIGX v. 3.0.2  
File config  
{  
“formtabs”:[  
{  
“MIGX\_id”:10,  
“caption”:“golosary”,  
“print\_before\_tabs”:“0”,  
“fields”:[  
{  
“MIGX\_id”:21,  
“field”:“tream”,  
“caption”:“\u041f\u043e\u043d\u044f\u0442\u0438\u0435”,  
“description”:“”,  
“description\_is\_code”:“0”,  
“inputTV”:“”,  
“inputTVtype”:“text”,  
“validation”:“”,  
“configs”:“”,  
“restrictive\_condition”:“”,  
“display”:“”,  
“sourceFrom”:“config”,  
“sources”:“”,  
“inputOptionValues”:“”,  
“default”:“”,  
“useDefaultIfEmpty”:“0”,  
“pos”:1  
},  
{  
“MIGX\_id”:25,  
“field”:“descr”,  
“caption”:“\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435”,  
“description”:“”,  
“description\_is\_code”:“0”,  
“inputTV”:“”,  
“inputTVtype”:“”,  
“validation”:“”,  
“configs”:“”,  
“restrictive\_condition”:“”,  
“display”:“”,  
“sourceFrom”:“config”,  
“sources”:“”,  
“inputOptionValues”:“”,  
“default”:“”,  
“useDefaultIfEmpty”:“0”,  
“pos”:2  
}  
],  
“pos”:1  
}  
],  
“contextmenus”:“”,  
“actionbuttons”:“importcsvmigx”,  
“columnbuttons”:“”,  
“filters”:“”,  
“extended”:{  
“migx\_add”:“”,  
“disable\_add\_item”:“”,  
“add\_items\_directly”:“”,  
“formcaption”:“”,  
“update\_win\_title”:“\u0413\u043e\u043b\u043e\u0441\u0430\u0440\u0438\u0439”,  
“win\_id”:“”,  
“maxRecords”:“”,  
“addNewItemAt”:“bottom”,  
“media\_source\_id”:“”,  
“multiple\_formtabs”:“”,  
“multiple\_formtabs\_label”:“”,  
“multiple\_formtabs\_field”:“”,  
“multiple\_formtabs\_optionstext”:“”,  
“multiple\_formtabs\_optionsvalue”:“”,  
“actionbuttonsperrow”:4,  
“winbuttonslist”:“”,  
“extrahandlers”:“”,  
“filtersperrow”:4,  
“packageName”:“”,  
“classname”:“”,  
“task”:“”,  
“getlistsort”:“”,  
“getlistsortdir”:“”,  
“sortconfig”:“”,  
“gridpagesize”:“”,  
“use\_custom\_prefix”:“0”,  
“prefix”:“”,  
“grid”:“”,  
“gridload\_mode”:1,  
“check\_resid”:1,  
“check\_resid\_TV”:“”,  
“join\_alias”:“”,  
“has\_jointable”:“yes”,  
“getlistwhere”:“”,  
“joins”:“”,  
“hooksnippets”:“”,  
“cmpmaincaption”:“”,  
“cmptabcaption”:“”,  
“cmptabdescription”:“”,  
“cmptabcontroller”:“”,  
“winbuttons”:“”,  
“onsubmitsuccess”:“”,  
“submitparams”:“”  
},  
“permissions”:{  
“apiaccess”:“”,  
“view”:“”,  
“list”:“”,  
“save”:“”,  
“create”:“”,  
“remove”:“”,  
“delete”:“”,  
“publish”:“”,  
“unpublish”:“”,  
“viewdeleted”:“”,  
“viewunpublished”:“”  
},  
“fieldpermissions”:“”,  
“columns”:[  
{  
“MIGX\_id”:1,  
“header”:“\u041f\u043e\u043d\u044f\u0442\u0438\u0435”,  
“dataIndex”:“tream”,  
“width”:200,  
“sortable”:“false”,  
“show\_in\_grid”:1,  
“customrenderer”:“”,  
“renderer”:“”,  
“clickaction”:“”,  
“selectorconfig”:“”,  
“renderchunktpl”:“”,  
“renderoptions”:“”,  
“editor”:“”  
},  
{  
“MIGX\_id”:2,  
“header”:“\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435”,  
“dataIndex”:“descr”,  
“width”:500,  
“sortable”:“false”,  
“show\_in\_grid”:1,  
“customrenderer”:“”,  
“renderer”:“”,  
“clickaction”:“”,  
“selectorconfig”:“”,  
“renderchunktpl”:“”,  
“renderoptions”:“”,  
“editor”:“”  
}  
],  
“category”:“\u0423\u0440\u043e\u043a\u0438”  
}

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [August 10, 2025, 4:59pm UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/16 "2025-08-10T16:59:40Z")

</div>

> [@Azazerus25](#):
>
> Example csv:  
> tream;descr  
> ssave;text  
> two;text\_2

By default the import processor uses the **comma** character (`,`) as the separator and NOT the **semicolon** (`;`).

The easiest way to fix the issue, is to change the import file to account for that.

---

<div class="post-metadata">

**Author:** ![Azazerus25](https://community.modx.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@Azazerus25](https://community.modx.com/u/Azazerus25)\
**Post date:** [August 12, 2025, 8:54am UTC](https://community.modx.com/t/how-do-i-import-data-from-excel-to-getimagelist/7385/17 "2025-08-12T08:54:29Z")

</div>

> [@halftrainedharry](#):
>
> `MODX_BASE_PATH .`

Thank you very much, everything worked out!!!
