# is there a way to write to csv file when there is more than 1 table

**URL:** https://discourse.vtk.org/t/is-there-a-way-to-write-to-csv-file-when-there-is-more-than-1-table/10279
**Category:** Support
**Created:** [December 21, 2022, 8:21am UTC](https://discourse.vtk.org/t/is-there-a-way-to-write-to-csv-file-when-there-is-more-than-1-table/10279 "2022-12-21T08:21:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![we\_create](https://discourse.vtk.org/user_avatar/discourse.vtk.org/we_create/32/5917_2.png) [@we\_create](https://discourse.vtk.org/u/we_create)
#### Post date: [December 21, 2022, 8:21am UTC](https://discourse.vtk.org/t/is-there-a-way-to-write-to-csv-file-when-there-is-more-than-1-table/10279/1 "2022-12-21T08:21:24Z")

</div>

Hi all,  
I have a question regarding writing to csv file.

In my program there are more than 1 table.Is there any way to write all the table data into one csv file.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [December 22, 2022, 3:33pm UTC](https://discourse.vtk.org/t/is-there-a-way-to-write-to-csv-file-when-there-is-more-than-1-table/10279/2 "2022-12-22T15:33:15Z")

</div>

There is not even a standard to write a single table into a CSV file. I would recommend to use a CSV file for each table for compatibility with other software, maybe zipped into one file.

If you don’t need other software to load your tables directly but you still want it to be human-readable then you can write your data into a custom json file (parsing is amazingly fast if you use RapidJSON).

If you don’t need the file to be human-readable then you could save multiple tables in an sqlite database file.

---

<div class="post-metadata">

### Author: ![we\_create](https://discourse.vtk.org/user_avatar/discourse.vtk.org/we_create/32/5917_2.png) [@we\_create](https://discourse.vtk.org/u/we_create)
#### Post date: [December 27, 2022, 2:46am UTC](https://discourse.vtk.org/t/is-there-a-way-to-write-to-csv-file-when-there-is-more-than-1-table/10279/3 "2022-12-27T02:46:03Z")

</div>

ok thank you and got it.
