# Load table from txt format

**URL:** <https://discourse.slicer.org/t/load-table-from-txt-format/2910>\
**Category:** Support\
**Created:** [May 23, 2018, 3:42pm UTC](https://discourse.slicer.org/t/load-table-from-txt-format/2910 "2018-05-23T15:42:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [May 23, 2018, 3:42pm UTC](https://discourse.slicer.org/t/load-table-from-txt-format/2910/1 "2018-05-23T15:42:22Z")

</div>

Hi @lassoan,

what is the syntax for a table in txt format to be properly loaded?

For example I have this table [https://www.dropbox.com/s/eqwrs03bohn4bs4/WEIN069\_cat.txt?dl=0](https://www.dropbox.com/s/eqwrs03bohn4bs4/WEIN069_cat.txt?dl=0)  
and it will loaded as only one column (also in the case that I remove the first 4 lines).

Has the syntax to follow strict rules? and in that case is there anywhere some documentation or example that shows the syntax?

Or instead is it possible to give to the table reader which is the separator between columns, etc…?

---

<div class="post-metadata">

**Author:** ![dzenanz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dzenanz/32/1992_2.png) [@dzenanz](https://discourse.slicer.org/u/dzenanz)\
**Post date:** [May 23, 2018, 3:47pm UTC](https://discourse.slicer.org/t/load-table-from-txt-format/2910/2 "2018-05-23T15:47:08Z")

</div>

Slicer supports tab separated values (.tsv) and comma separated values (.csv). Import your text file into a spreadsheet program using fixed-width columns, then save it as either a CSV or TSV.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 23, 2018, 4:13pm UTC](https://discourse.slicer.org/t/load-table-from-txt-format/2910/3 "2018-05-23T16:13:05Z")

</div>

If you need to read such files regularly then reading of such text files could be implemented in VTK CSV file reader (vtkDelimitedTextReader) and exposed in Slicer.

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [May 24, 2018, 8:27am UTC](https://discourse.slicer.org/t/load-table-from-txt-format/2910/4 "2018-05-24T08:27:04Z")

</div>

Ok, thanks for the info
