# How to output/import cypher queries result in a csv file?

**URL:** <https://community.neo4j.com/t/how-to-output-import-cypher-queries-result-in-a-csv-file/5979>\
**Category:** Cypher\
**Tags:** import\
**Created:** [March 22, 2019, 12:07pm UTC](https://community.neo4j.com/t/how-to-output-import-cypher-queries-result-in-a-csv-file/5979 "2019-03-22T12:07:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shatadrusaha](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shatadrusaha/32/3828_2.png) [@shatadrusaha](https://community.neo4j.com/u/shatadrusaha)\
**Post date:** [March 22, 2019, 12:07pm UTC](https://community.neo4j.com/t/how-to-output-import-cypher-queries-result-in-a-csv-file/5979/1 "2019-03-22T12:07:03Z")

</div>

Hello,

I had been using Neo4j comunity eidtion 3.0.0 In the previous version, I used to execute multiple cypher queries and output the results in individual csv files. Due to some reason, the installation was corrupted and I can't find the older version. So, I installed the latest verion of Neo4j 3.5.3

I want to know, how do I achieve the same result now? I have a '.cql' file, which has multiple cypher queries. How do I save the results of each cypher queries in individual csv files? In the previous version I had used "neo4j-shell.bat" to import the results. But in the current versions, this is not supported.

Previouly I used the following cypher command to get the results in a csv, in a cql file:

import-cypher -d"," -o E:/Graph\_Database/Results/policy.csv MATCH (pol:Pol)-[r:IS\_PHL]-\>(), (pol:Pol)-[r2:POLICY\_FOR]-\>(veh:Veh) WHERE pol.Misc\_Sls\_Date \>= '2019-02-19' WITH COLLECT(r2.Underwriter) AS `Underwriter`, pol, COLLECT(DISTINCT(r.Credit\_MatchStatus)) AS `Match_Status` RETURN pol.Policy\_number AS `Policy_#`, CASE WHEN pol.Policy\_Canceled = '0' THEN 'Active' ELSE 'Cancelled' END AS `Policy_Status`, CASE WHEN pol.Fraud = '1' THEN 'Yes' ELSE 'No' END AS `Fraud`, pol.Misc\_Sls\_Date AS `Sale_Date`, `Underwriter`, `Match_Status`, pol.Brand AS `Brand`;

Looking forward for your help.

Regards,  
Shatadru
