# Import equivalent of system.dataset.exportCSV?

**URL:** <https://forum.inductiveautomation.com/t/import-equivalent-of-system-dataset-exportcsv/3491>\
**Category:** Ignition\
**Created:** [October 25, 2011, 8:42pm UTC](https://forum.inductiveautomation.com/t/import-equivalent-of-system-dataset-exportcsv/3491 "2011-10-25T20:42:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nate.Olson](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nate.Olson](https://forum.inductiveautomation.com/u/Nate.Olson)\
**Post date:** [October 25, 2011, 8:42pm UTC](https://forum.inductiveautomation.com/t/import-equivalent-of-system-dataset-exportcsv/3491/1 "2011-10-25T20:42:18Z")

</div>

Is there a way to Import a .CSV file into a dataset? I would like to use the exportCSV script, modify my dataset in Excel, then import the updated .CSV file into a dataset.

Thanks

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 25, 2011, 9:58pm UTC](https://forum.inductiveautomation.com/t/import-equivalent-of-system-dataset-exportcsv/3491/2 "2011-10-25T21:58:56Z")

</div>

Yes, you can! You can use the system.dataset.fromCSV function to pull in a CSV with something like this:`path = system.file.openFile("csv")
if path != None:
	csv = system.file.readFileAsString(path)
	event.source.parent.getComponent('Table').data = system.dataset.fromCSV(csv)`The only issue with that is it expects a certain format as a header.`"#NAMES"
"Index","Name","Value"
"#TYPES"
"I","str","D"
"#ROWS","4"
"81","Test Row 4","83.01864192210952"
"54","Test Row 4","95.4011884590994"
"68","Test Row 16","60.654079821521954"
"65","Test Row 2","53.594277189481744"`Otherwise, you can use the system.file.readFileAsString() directly to get the text of a CSV and parse through it into a dataset however you’d like.
