# LOAD CSV From a Local File Windows10

**URL:** <https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759>\
**Category:** Import / Export\
**Tags:** import\
**Created:** [July 13, 2019, 8:43pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759 "2019-07-13T20:43:29Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![renatospaka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/renatospaka/32/9445_2.png) [@renatospaka](https://community.neo4j.com/u/renatospaka)\
**Post date:** [July 13, 2019, 8:43pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/1 "2019-07-13T20:43:29Z")

</div>

Hi guys, how are you doing?

I'm new in Neo4j and I'm facing some issues when loading data from a local file in a Windows 10 system to a sandbox instance of Neo4j 3.5

Basically the command is this:  
_LOAD CSV WITH HEADERS_  
_FROM 'C:\Users\Renato\Desenvolvimento\laboratorios.csv'_  
_AS row_  
_RETURN trim(row.name), row.fundation, trim(row.companyId)_

But it never ran. It keep sending over and over the same message:

#### Neo.ClientError.Statement.SyntaxError

Neo.ClientError.Statement.SyntaxError: Invalid input 's': expected four hexadecimal digits specifying a unicode character (line 2, column 11 (offset: 32)) "FROM 'C:\Users\Renato\Desenvolvimento\laboratorios.csv'"

I really don't get why it is expecting an unicode character here. Anyway, I don't know how to proceed and I have no http server to use as source of the file "laboratorios.csv".

If someone could give me a hand, I apreciate it.

Thanks.

---

<div class="post-metadata">

**Author:** ![futuristnicole](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/futuristnicole/32/5259_2.png) [@futuristnicole](https://community.neo4j.com/u/futuristnicole)\
**Post date:** [July 13, 2019, 9:11pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/2 "2019-07-13T21:11:33Z")

</div>

I use Jupiter Notebook to upload for a CSV.

[Link to my code for importing CSV.](https://1drv.ms/b/s!AgFGW4DSJv5Pi7ouHcnGQWXupjcbWQ?e=DnOsEE)

---

<div class="post-metadata">

**Author:** ![renatospaka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/renatospaka/32/9445_2.png) [@renatospaka](https://community.neo4j.com/u/renatospaka)\
**Post date:** [July 14, 2019, 12:42am UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/3 "2019-07-14T00:42:26Z")

</div>

Hey Nicole, thanks for your response.

I understod that you creared a python code to upload data to your neo4j. Now I'm evaluating if neo4j would apply to my solution, and I really don't want to code (much). Do you know how to turn around this 'local file' issue using features from CYPHER or BOLT?

---

<div class="post-metadata">

**Author:** ![alfonso.martinez](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/alfonso.martinez/32/4376_2.png) [@alfonso.martinez](https://community.neo4j.com/u/alfonso.martinez)\
**Post date:** [July 14, 2019, 6:56am UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/4 "2019-07-14T06:56:00Z")

</div>

Howdy,

It would be helpful for us to see your import file. Here is a snippet of one of my import files for one of my databases that creates Genre nodes:

| genre\_id | name | genre\_type | multimedia\_format\_id |
| --- | --- | --- | --- |
| 1 | Audio Books | Audio | 1 |
| 2 | Blues | Audio | 1 |

I prefer all my import files to be tab delimited.

My cypher call is as follows:

LOAD CSV WITH HEADERS FROM "File:///ld\_genre.txt" AS row  
FIELDTERMINATOR '\t'  
CREATE (g:Genre {genre\_id: TOINTEGER(row.genre\_id), name: TRIM(row.name), genre\_type: TRIM(row.genre\_type), multimedia\_format\_id: TOINTEGER(row.multimedia\_format\_id)})  
;

I hope this helps you in solving your issue.

~Alfonso

---

<div class="post-metadata">

**Author:** ![renatospaka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/renatospaka/32/9445_2.png) [@renatospaka](https://community.neo4j.com/u/renatospaka)\
**Post date:** [July 15, 2019, 5:53pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/5 "2019-07-15T17:53:15Z")

</div>

Hi Alfonso, sorry for the delay.

This is a sample of the data I am trying to upload (LOAD CSV). There is no other formatation in the file.

**name,fundation,companyId**  
Laboratório 1,31/12/2010,##Laboratório140543  
Laboratório 2,17/03/2007,##Laboratório239158

---

<div class="post-metadata">

**Author:** ![alfonso.martinez](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/alfonso.martinez/32/4376_2.png) [@alfonso.martinez](https://community.neo4j.com/u/alfonso.martinez)\
**Post date:** [July 16, 2019, 2:20am UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/6 "2019-07-16T02:20:33Z")

</div>

Howdy!

I will try to duplicate your error sometime with this short version in m y test database.

Let you know soon!  
~Alfonso

---

<div class="post-metadata">

**Author:** ![renatospaka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/renatospaka/32/9445_2.png) [@renatospaka](https://community.neo4j.com/u/renatospaka)\
**Post date:** [July 16, 2019, 3:04pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/7 "2019-07-16T15:04:11Z")

</div>

Thanks Alfonso.

It seems to be the accented words, in Portuguese we have a lot of these. Anyway, I still don't know what is wrong.

---

<div class="post-metadata">

**Author:** ![alfonso.martinez](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/alfonso.martinez/32/4376_2.png) [@alfonso.martinez](https://community.neo4j.com/u/alfonso.martinez)\
**Post date:** [July 17, 2019, 5:22am UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/8 "2019-07-17T05:22:04Z")

</div>

I created a test CSV file and tested your script against my test database:

LOAD CSV WITH HEADERS FROM 'File:///laboratorios.csv' AS row RETURN trim(row.name), row.fundation, trim(row.companyId)

| trim(row.name) | row.fundation | trim(row.companyId) |
| --- | --- | --- |
| "Laborat�rio 1" | "31/12/2010" | "##Laborat�rio140543" |
| "Laborat�rio 2" | "17/03/2007" | "##Laborat�rio239158" |

I did not duplicate your error--however, this produced the same issue I described in an open Topic for the same problem. I am running on OpenSuse and Neo4j. However, I will try again on my Windows box and see if I can get the same error you had.

P.S. I know that you can use MATCH and SET statements to correct characters in the database to replace the grey "diamond-?" symbols.

---

<div class="post-metadata">

**Author:** ![ameyasoft](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ameyasoft/32/32639_2.png) [@ameyasoft](https://community.neo4j.com/u/ameyasoft)\
**Post date:** [July 17, 2019, 6:36am UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/9 "2019-07-17T06:36:43Z")

</div>

I got the same result as alfonso.martinez on my Windows 10 machine. No error.

---

<div class="post-metadata">

**Author:** ![renatospaka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/renatospaka/32/9445_2.png) [@renatospaka](https://community.neo4j.com/u/renatospaka)\
**Post date:** [July 17, 2019, 10:16am UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/10 "2019-07-17T10:16:01Z")

</div>

Alfonso.

I noticed you used **'File:///laboratorios.csv'** instead of **'C:\Users\Renato\Desenvolvimento\laboratorios.csv'**. My opinion is that OPEN CSV is unable to locate a local file in my system.

Anyway, I apreciate your support to figure out what is going on here.

Thanks

---

<div class="post-metadata">

**Author:** ![sfd](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sfd/32/5675_2.png) [@sfd](https://community.neo4j.com/u/sfd)\
**Post date:** [July 17, 2019, 3:24pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/11 "2019-07-17T15:24:06Z")

</div>

What worked for me was the combination of the 'file:///filename.csv' AND the file being put into the Import folder within the database you are trying to populate. I found this info out here: [How-To: Import CSV Data with Neo4j Desktop - Developer Guides](https://neo4j.com/developer/desktop-csv-import/)

---

<div class="post-metadata">

**Author:** ![renatospaka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/renatospaka/32/9445_2.png) [@renatospaka](https://community.neo4j.com/u/renatospaka)\
**Post date:** [July 17, 2019, 10:16pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/12 "2019-07-17T22:16:16Z")

</div>

Hi Sharon.

For now I am evaluating a sandbox instance of Neo4j, and that's what I think is causing the issue. See, I am trying to upload a file from my local system to this sandbox instance through a browser using LOAD CSV and seems that the browser is not able to locate the file properly.

I will read this info you sent me.

---

<div class="post-metadata">

**Author:** ![alfonso.martinez](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/alfonso.martinez/32/4376_2.png) [@alfonso.martinez](https://community.neo4j.com/u/alfonso.martinez)\
**Post date:** [July 18, 2019, 3:23am UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/13 "2019-07-18T03:23:18Z")

</div>

True...I used Linux in my testing, which is my primary OS; hence, the process is the same regardless the OS used for Neo4j. Sharon provided a good resource; I prefer using the manual myself. Refer to [LOAD CSV - Cypher Manual](https://neo4j.com/docs/cypher-manual/current/clauses/load-csv/).

Good luck!

---

<div class="post-metadata">

**Author:** ![renatospaka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/renatospaka/32/9445_2.png) [@renatospaka](https://community.neo4j.com/u/renatospaka)\
**Post date:** [July 19, 2019, 10:25pm UTC](https://community.neo4j.com/t/load-csv-from-a-local-file-windows10/8759/14 "2019-07-19T22:25:18Z")

</div>

Alfonso, Sharon.

You are great, both of you. I made a small search in Google and found this video [Neo4j Sandbox: Google Spreadsheets/Drive Integration - YouTube](https://www.youtube.com/watch?v=7aON114bXxA) explainng how to upload data from Google Sheets.

This is how I go.

Thank you very much fellows.
