# È possibile esportare i dati dei post di un argomento in CSV?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-export-topic-post-data-to-csv/295350>\
**Category:** Support\
**Tags:** data-explorer\
**Created:** [14 Febbraio 2024, 3:19pm UTC](https://meta.discourse.org/t/is-it-possible-to-export-topic-post-data-to-csv/295350 "2024-02-14T15:19:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [14 Febbraio 2024, 3:56pm UTC](https://meta.discourse.org/t/is-it-possible-to-export-topic-post-data-to-csv/295350/3 "2024-02-14T15:56:59Z")

</div>

Sì, puoi esportare il risultato della query in un file CSV. Hai un pulsante per quell’azione:

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/3/c/d3cb4be14d3406163cf39315817fef7b135b812c.png)

Non sono del tutto sicuro se questo sia esattamente ciò che avevi in mente, ma posso fornirti un punto di partenza. Fornisci un ID argomento e il numero del post da cui desideri ottenere tutte le risposte:

```SQL
-- [params]
-- integer :topic_id
-- integer :post_number

SELECT u.id,
       u.username,
       p.raw,
       p.cooked
FROM topics t
JOIN posts p ON t.id = p.topic_id
JOIN users u ON p.user_id = u.id
WHERE t.id = :topic_id
  AND p.reply_to_post_number = :post_number
  AND p.hidden_at IS NULL
  AND p.deleted_at IS NULL

```

Questo appare così:

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/5/8/058642eb72bceb4c2527ec57a88ed881bec28168.png)

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-export-topic-post-data-to-csv/295350)._
