# Error when uploading csv with : in it

**URL:** <https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848>\
**Category:** Help Hub\
**Tags:** uploads\
**Created:** [September 25, 2024, 8:15am UTC](https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848 "2024-09-25T08:15:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![security-cosmonaut-4](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@security-cosmonaut-4](https://community.postman.com/u/security-cosmonaut-4)\
**Post date:** [September 25, 2024, 8:15am UTC](https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848/1 "2024-09-25T08:15:53Z")

</div>

I am trying to upload a csv with header and values.  
In the column Body (header), I have below json code as the value.  
Body

```auto
{
  "userId": "q",
  "password": "q"
}

```

I get an error due to non trimmable byte.  
`"{\"UserId\": \"a\", \"Password\": \"a\"}"`  
After using escape characters, I was able to upload half of the text only upto comma. (,) but not not the whole text.

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [September 25, 2024, 1:00pm UTC](https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848/2 "2024-09-25T13:00:46Z")

</div>

Try removing the outside quotes so it starts and ends with the curly brackets.

I have examples of doing this, and I didn’t need to escape anything in the JSON.

I’m assuming your CSV has one header and this should be read in as a single object?

You do need to use JSON.parse when retrieving the iteration data to turn it into a real object, otherwise it will just be treated as a string.

---

<div class="post-metadata">

**Author:** ![security-cosmonaut-4](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@security-cosmonaut-4](https://community.postman.com/u/security-cosmonaut-4)\
**Post date:** [September 25, 2024, 1:55pm UTC](https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848/3 "2024-09-25T13:55:19Z")

</div>

Hi Mike,  
thanks for quick reply.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/a/1a9308086fde0beb61f957ee29e57bc6d33a078c.png)  
This is my data file with headers and values. For the column Body, I am trying to send the user name and password (everything as a json value).

I tried removing quotes, and it still the same. What ever after the , comma is throwing error.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/a/2a90e5b8379ec8301416f194d1cc178ad8590bf7.png)

Could you please help me on this.

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [September 25, 2024, 3:43pm UTC](https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848/4 "2024-09-25T15:43:14Z")

</div>

What happens if you try and preview that file.

I just tried with ; as the delimiter and it doesn’t seem to work.

I don’t see any options in Postman to select a different type of delimiter.

However, tried it with a basic file with a single header, and got the same issue when saving from standard notepad as UTF-8.

I created a CSV file in Excel, and exported it as UTF-8 and this appeared to work ok.

This is how it looks in Excel.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/5/2/523ff1d4ce342ee4b01ab246b907bd219634087e.png)

If I open the file in Notepad++, you can see that Excel has automatically escaped the file for you.

```auto
Endpoint,Query,Body
serverapi/Auth/interactive,,"{""UserID"": ""b"",""Password"":""b""}"

```

I could then add the / slash to serverapi (which I couldn’t do in Excel).

This seems to work as you can see in the following preview.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/a/1/a18d068f2acfc65c3d59d7ec40629681410e2c8b.png)

---

<div class="post-metadata">

**Author:** ![security-cosmonaut-4](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@security-cosmonaut-4](https://community.postman.com/u/security-cosmonaut-4)\
**Post date:** [September 25, 2024, 4:36pm UTC](https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848/5 "2024-09-25T16:36:00Z")

</div>

Hi Mike, you saved me!  
Thank you so much for your time and effort.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [September 28, 2024, 4:36pm UTC](https://community.postman.com/t/error-when-uploading-csv-with-in-it/68848/6 "2024-09-28T16:36:09Z")

</div>

Closed on September 28, 2024, 4:36pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
