# CSV Writer from VTK

**URL:** https://discourse.paraview.org/t/csv-writer-from-vtk/15371
**Category:** ParaView Support
**Tags:** vtk
**Created:** [September 10, 2024, 3:38am UTC](https://discourse.paraview.org/t/csv-writer-from-vtk/15371 "2024-09-10T03:38:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rmdmagalong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rmdmagalong](https://discourse.paraview.org/u/rmdmagalong)
#### Post date: [September 10, 2024, 3:38am UTC](https://discourse.paraview.org/t/csv-writer-from-vtk/15371/1 "2024-09-10T03:38:10Z")

</div>

Hi everyone,

I am trying to extract data from a VTK in the form of CSV. Now, I want it to have columns of X, Y, Z, and the Resistivity. I have used the CSV writer for this:

![image](https://discourse.paraview.org/uploads/default/original/2X/1/10aca57e2b9ce3238b32b3f51dc905f5a8c8ef32.png)

Now, if I click on point data, only XYZ columns are generated in the CSV. if I choose cell data, only resistivity data shows up. if I choose field data, I get a blank CSV. I am not certain if the cells in cell data CSV and point data CSV match each other so I did not join them into one.

Here’s the VTK file:

> **[3D.vtk](https://drive.google.com/file/d/1R8aNilCjfKKh7LKMLG_IIf7gV1IGYomc/view?usp=sharing)**
>
> Google Drive file.

Many thanks,  
Raymond

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 10, 2024, 11:37am UTC](https://discourse.paraview.org/t/csv-writer-from-vtk/15371/2 "2024-09-10T11:37:45Z")

</div>

HI @rmdmagalong

You are probably looking to use CellDataToPointData before save the output as .csv

Best,

---

<div class="post-metadata">

### Author: ![rmdmagalong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@rmdmagalong](https://discourse.paraview.org/u/rmdmagalong)
#### Post date: [September 11, 2024, 6:40am UTC](https://discourse.paraview.org/t/csv-writer-from-vtk/15371/3 "2024-09-11T06:40:50Z")

</div>

It worked like a charm! Thanks, Mathieu!

Regards,  
Raymond
