# Batch data import to Ignition

**URL:** <https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [April 11, 2022, 12:17pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284 "2022-04-11T12:17:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eren.uyanik](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eren.uyanik/32/30923_2.png) [@eren.uyanik](https://forum.inductiveautomation.com/u/eren.uyanik)\
**Post date:** [April 11, 2022, 12:17pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284/1 "2022-04-11T12:17:15Z")

</div>

Hello all,

I have 560 id data with single column (560x1). I need to use these data for http request therefore I thought create dataset and use with for loop. However, writing 560 lines one by one into ignition dataset feels a bit strange.

What is the best way for this operation? Can I import (read) directly from Excel?

Thank you

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 11, 2022, 1:19pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284/2 "2022-04-11T13:19:48Z")

</div>

Use a Python script to convert the dataset into the format you want.

```auto
myDataset = []
for row in range(len(idData)):
    myDataset.append(idData[row])

```

Is that the kind of thing you’re looking for?

---

<div class="post-metadata">

**Author:** ![eren.uyanik](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eren.uyanik/32/30923_2.png) [@eren.uyanik](https://forum.inductiveautomation.com/u/eren.uyanik)\
**Post date:** [April 11, 2022, 1:22pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284/3 "2022-04-11T13:22:22Z")

</div>

Actually no, I’m looking to import data from excel or anywhere… I’ll apply this code after when I import the data from outside to Ignition 🙂

Thanks for sharing

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 11, 2022, 1:27pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284/4 "2022-04-11T13:27:48Z")

</div>

OK but it’s still not clear. As far as I can tell -

- You have an Excel file with 560 items in a single column.
- You want to load these onto the gateway.
- You want to form 560 URLs based on the uploaded data and add them to a list or dataset.

Can you use the File Upload component (Perspective)? (You haven’t tagged your original question as either _Vision_ or _Perspective_. You should probably edit to add the tag.)

---

<div class="post-metadata">

**Author:** ![eren.uyanik](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eren.uyanik/32/30923_2.png) [@eren.uyanik](https://forum.inductiveautomation.com/u/eren.uyanik)\
**Post date:** [April 11, 2022, 1:48pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284/5 "2022-04-11T13:48:01Z")

</div>

Actually I thought that can solve with gateway script not perspective or vision (for UI design)…

Yes, I have 560 items in a single column. I can write this items to Excel, Word, Text file etc… doesn’t matter… The important thing is how to get these items to Ignition. Probably easiest to read from excel but i’m not sure. Maybe in some way this items can be received in JSON format.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 11, 2022, 1:51pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284/6 "2022-04-11T13:51:33Z")

</div>

> [@Copying an Excel file to a table's dataset](https://forum.inductiveautomation.com/t/copying-a-excel-file-to-a-tables-dataset/34942/13):
>
> Got my paperwork done early, so here's a sample to read from an Excel file EDIT: Reworked a bit to work with both .xls and .xlsx files EDIT: Modified to properly cast data types EDIT: Added handler for formula cell types EDIT: Added parameters to optionally specify sheet, row, and column numbers Reading back a file created from my other example: def excelToDataSet(fileName, hasHeaders = False, sheetNum = 0, firstRow = None, lastRow = None, firstCol = None, lastCol = None): import org.apac…

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 11, 2022, 4:41pm UTC](https://forum.inductiveautomation.com/t/batch-data-import-to-ignition/58284/7 "2022-04-11T16:41:46Z")

</div>

For a one-time job, I would just use the script console.

Excel copies data to the clipboard as TSV (tab-separated values).

It’s pretty easy to write a naive parser for that in Python and then insert the parsed values into a dataset using `system.data.toDataSet`.
