Hi,
I have csv data coming through mail. When I want to parse them with Parse CSV module; it gives error.
CSV data looks like this when I say download output bundle;
But it is actually something like this;
When I copy the attachment data as long text and run Parse CSV, it just works and it looks exactly how it seems like on the “download output bundle”
How can I convert this unknown numbers into string to use Parse CSV module?
Thank you!
Just try to convert the output to string using the “toString” function and it should work.
Else share the output file here, I will help you fix that.
The issue is happening because the default values coming in the output have " quotes. and also some unwanted prefix like \u0000
1 Like
Hey @ManishMandot ,
I already tried toString but it gives the same result. I cannot just convert this unknown numbers into a regular string text. This is the problem. When I copy and paste the text, it works correct.
\u0000 → this character is a null character, so I need this in my csv file because some cells are empty.
" → I dont need this one.
Here is the output:
[
{
"CommaSeperatedText": "D\u0000a\u0000t\u0000u\u0000m\u0000;\u0000A\u0000n\u0000f\u0000r\u0000a\u0000g\u0000e\u0000n\u0000-\u0000I\u0000D\u0000;\u0000A\u0000n\u0000r\u0000e\u0000d\u0000e\u0000;\u0000V\u0000o\u0000r\u0000n\u0000a\u0000m\u0000e\u0000;\u0000N\u0000a\u0000c\u0000h\u0000n\u0000a\u0000m\u0000e\u0000;\u0000F\u0000i\u0000r\u0000m\u0000a\u0000;\u0000\"\u0000S\u0000t\u0000r\u0000a\u0000\u0000e\u0000 \u0000u\u0000n\u0000d\u0000 \u0000H\u0000a\u0000u\u0000s\u0000n\u0000u\u0000m\u0000m\u0000e\u0000r\u0000\"\u0000;\u0000P\u0000L\u0000Z\u0000;\u0000O\u0000r\u0000t\u0000;\u0000\"\u0000G\u0000e\u0000o\u0000-\u0000K\u0000o\u0000o\u0000r\u0000d\u0000i\u0000n\u0000a\u0000t\u0000e\u0000n\u0000 \u0000d\u0000e\u0000s\u0000 \u0000O\u0000b\u0000j\u0000e\u0000k\u0000t\u0000s\u0000\"\u0000;\u0000K\u0000o\u0000n\u0000t\u0000a\u0000k\u0000t\u0000n\u0000u\u0000m\u0000m\u0000e\u0000r\u0000;\u0000Z\u0000u\u0000s\u0000a\u0000t\u0000z\u0000n\u0000u\u0000m\u0000m\u0000e\u0000r\u0000;\u0000E\u0000-\u0000M\u0000a\u0000i\u0000l\u0000;\u0000\"\u0000I\u0000n\u0000t\u0000e\u0000r\u0000e\u0000s\u0000s\u0000e\u0000 \u0000a\u0000n\u0000\"\u0000;\u0000\"\u0000W\u0000o\u0000r\u0000a\u0000u\u0000f\u0000 \u0000s\u0000o\u0000l\u0000l\u0000 \u0000d\u0000i\u0000e\u0000 \u0000S\u0000o\u0000l\u0000a\u0000r\u0000a\u0000n\u0000l\u0000a\u0000g\u0000e\u0000 \u0000i\u0000n\u0000s\u0000t\u0000a\u0000l\u0000l\u0000i\u0000e\u0000r\u0000t\u0000 \u0000w\u0000e\u0000r\u0000d\u0000e\u0000n\u0000?\u0000\"\u0000;\u0000\"\u0000A\u0000u\u0000s\u0000r\u0000i\u0000c\u0000h\u0000t\u0000u\u0000n\u0000g\u0000 \u0000d\u0000e\u0000r\u0000 \u0000F\u0000l\u0000\u0000c\u0000h\u0000e\u0000\"\u0000;\u0000E\u0000i\u0000g\u0000e\u0000n\u0000t\u0000u\u0000m\u0000s\u0000v\u0000e\u0000r\u0000h\u0000\u0000l\u0000t\u0000n\u0000i\u0000s\u0000;\u0000\"\u0000A\u0000l\u0000t\u0000e\u0000r\u0000 \u0000d\u0000e\u0000r\u0000 \u0000F\u0000l\u0000\u0000c\u0000h\u0000e\u0000\"\u0000;\u0000S\u0000t\u0000r\u0000o\u0000m\u0000v\u0000e\u0000r\u0000b\u0000r\u0000a\u0000u\u0000c\u0000h\u0000;\u0000\"\u0000S\u0000o\u0000n\u0000n\u0000i\u0000g\u0000e\u0000 \u0000F\u0000l\u0000\u0000c\u0000h\u0000e\u0000 \u0000i\u0000n\u0000 \u0000q\u0000m\u0000\"\u0000;\u0000\"\u0000S\u0000i\u0000n\u0000d\u0000 \u0000S\u0000i\u0000e\u0000 \u0000a\u0000n\u0000 \u0000e\u0000i\u0000n\u0000e\u0000m\u0000 \u0000S\u0000t\u0000r\u0000o\u0000m\u0000s\u0000p\u0000e\u0000i\u0000c\u0000h\u0000e\u0000r\u0000 \u0000i\u0000n\u0000t\u0000e\u0000r\u0000e\u0000s\u0000s\u0000i\u0000e\u0000r\u0000t\u0000?\u0000\"\u0000;\u0000\"\u0000N\u0000e\u0000i\u0000g\u0000u\u0000n\u0000g\u0000 \u0000d\u0000e\u0000r\u0000 \u0000F\u0000l\u0000\u0000c\u0000h\u0000e\u0000\"\u0000;\u0000\"\u0000A\u0000r\u0000t\u0000 \u0000d\u0000e\u0000s\u0000 \u0000E\u0000r\u0000w\u0000e\u0000r\u0000b\u0000s\u0000\"\u0000;\u0000\"\u0000S\u0000o\u0000n\u0000s\u0000t\u0000i\u0000g\u0000e\u0000 \u0000I\u0000n\u0000f\u0000o\u0000r\u0000m\u0000a\u0000t\u0000i\u0000o\u0000n\u0000e\u0000n\u0000\"\u0000\n\u00000\u00006\u0000.\u00000\u00006\u0000.\u00002\u00000\u00002\u00003\u0000;\u00001\u00003\u00003\u00009\u00004\u00000\u00005\u0000;\u0000H\u0000e\u0000r\u0000r\u0000;\u0000L\u0000o\u0000t\u0000h\u0000a\u0000r\u0000;\u0000H\u0000u\u0000t\u0000s\u0000c\u0000h\u0000e\u0000n\u0000r\u0000e\u0000u\u0000t\u0000e\u0000r\u0000;\u0000;\u0000\"\u0000W\u0000a\u0000n\u0000g\u0000e\u0000n\u0000b\u0000l\u0000i\u0000c\u0000k\u0000 \u00002\u0000\"\u0000;\u0000\"\u0000=\u0000\"\u0000\"\u00007\u00002\u00005\u00008\u00009\u0000\"\u0000\"\u0000\"\u0000;\u0000W\u0000e\u0000s\u0000t\u0000e\u0000r\u0000h\u0000e\u0000i\u0000m\u0000;\u0000h\u0000t\u0000t\u0000p\u0000:\u0000/\u0000/\u0000m\u0000a\u0000p\u0000s\u0000.\u0000g\u0000o\u0000o\u0000g\u0000l\u0000e\u0000.\u0000d\u0000e\u0000/\u0000m\u0000a\u0000p\u0000s\u0000?\u0000q\u0000=\u00004\u00008\u0000.\u00005\u00001\u00005\u00004\u00005\u00008\u00008\u00000\u00000\u00001\u00006\u00002\u00007\u00001\u0000,\u00009\u0000.\u00006\u00001\u00007\u00000\u00009\u00003\u00008\u00001\u00005\u00003\u00004\u00004\u00002\u00002\u00006\u0000&\u0000h\u0000l\u0000=\u0000d\u0000e\u0000&\u0000t\u0000=\u0000w\u0000&\u0000z\u0000=\u00001\u00008\u0000;\u00000\u00001\u00005\u00007\u00007\u00003\u00005\u00000\u00001\u00009\u00006\u00000\u0000;\u0000;\u0000h\u0000u\u0000t\u0000s\u0000c\u0000h\u0000e\u0000n\u0000r\u0000e\u0000u\u0000t\u0000e\u0000r\u0000-\u0000l\u0000@\u0000t\u0000-\u0000o\u0000n\u0000l\u0000i\u0000n\u0000e\u0000.\u0000d\u0000e\u0000;\u0000P\u0000h\u0000o\u0000t\u0000o\u0000v\u0000o\u0000l\u0000t\u0000a\u0000i\u0000k\u0000;\u0000E\u0000i\u0000n\u0000-\u0000/\u0000Z\u0000w\u0000e\u0000i\u0000f\u0000a\u0000m\u0000i\u0000l\u0000i\u0000e\u0000n\u0000h\u0000a\u0000u\u0000s\u0000;\u0000S\u0000\u0000d\u0000;\u0000\"\u0000I\u0000s\u0000t\u0000 \u0000(\u0000M\u0000i\u0000t\u0000-\u0000)\u0000E\u0000i\u0000g\u0000e\u0000n\u0000t\u0000\u0000m\u0000e\u0000r\u0000/\u0000i\u0000n\u0000\"\u0000;\u0000\"\u00002\u00005\u0000 \u0000b\u0000i\u0000s\u0000 \u00007\u00005\u0000 \u0000J\u0000a\u0000h\u0000r\u0000e\u0000 \u0000a\u0000l\u0000t\u0000\"\u0000;\u00002\u00005\u00000\u00000\u0000;\u00002\u00001\u0000;\u0000J\u0000a\u0000;\u0000\"\u00003\u00001\u0000\u0000 \u0000b\u0000i\u0000s\u0000 \u00004\u00005\u0000\u0000\"\u0000;\u0000\"\u0000M\u0000i\u0000e\u0000t\u0000e\u0000 \u0000/\u0000 \u0000K\u0000a\u0000u\u0000f\u0000\"\u0000;\u0000\"\u0000=\u0000\"\u0000\"\u0000-\u0000 \u0000E\u0000i\u0000n\u0000f\u0000a\u0000m\u0000i\u0000l\u0000i\u0000e\u0000n\u0000h\u0000a\u0000u\u0000s\u0000;\u0000 \u0000-\u0000 \u0000G\u0000e\u0000b\u0000\u0000u\u0000d\u0000e\u0000 \u0000s\u0000t\u0000e\u0000h\u0000t\u0000 \u0000i\u0000m\u0000 \u0000E\u0000i\u0000g\u0000e\u0000n\u0000t\u0000u\u0000m\u0000 \u0000d\u0000e\u0000r\u0000 \u0000a\u0000n\u0000f\u0000r\u0000a\u0000g\u0000e\u0000n\u0000d\u0000e\u0000n\u0000 \u0000P\u0000e\u0000r\u0000s\u0000o\u0000n\u0000;\u0000 \u0000-\u0000 \u0000A\u0000n\u0000f\u0000r\u0000a\u0000g\u0000e\u0000n\u0000d\u0000e\u0000 \u0000P\u0000e\u0000r\u0000s\u0000o\u0000n\u0000 \u0000i\u0000s\u0000t\u0000 \u0000d\u0000o\u0000r\u0000t\u0000 \u0000w\u0000o\u0000h\u0000n\u0000h\u0000a\u0000f\u0000t\u0000;\u0000 \u0000-\u0000 \u0000D\u0000a\u0000c\u0000h\u0000e\u0000i\u0000n\u0000d\u0000e\u0000c\u0000k\u0000u\u0000n\u0000g\u0000:\u0000 \u0000B\u0000e\u0000t\u0000o\u0000n\u0000z\u0000i\u0000e\u0000g\u0000e\u0000l\u0000;\u0000 \u0000-\u0000 \u0000E\u0000r\u0000r\u0000e\u0000i\u0000c\u0000h\u0000b\u0000a\u0000r\u0000k\u0000e\u0000i\u0000t\u0000 \u0000K\u0000o\u0000n\u0000t\u0000a\u0000k\u0000t\u0000n\u0000u\u0000m\u0000m\u0000e\u0000r\u0000:\u0000 \u0000g\u0000a\u0000n\u0000z\u0000t\u0000a\u0000g\u0000s\u0000\"\u0000\"\u0000\"\u0000\n\u0000"
}
]
It shows it like a normal string in popup below but when I download the output it shows like unknown numbers above:
I hope someone can help me with this.
Hi @onurbolaca,
I will look more into this but mainly the issue is, not frankly sure why you are getting those characters from the attachment, but, \u000
is the Unicode representation of a character with ASCII code 0 and it for some reason being generated in the CSV you are getting.
ascii function might work for this, but when I tried it it was not working, So, The other option will be to use replace function.
{{replace(replace(replace(1.csv; “\u0000”; emptystring); “\u0000”; emptystring); “"”"; emptystring)}}
But, I think you can just use,
{{replace(1.csv; "\u0000"; emptystring)}}
I will check on this thoroughly and see if there is better way to do it.
2 Likes
Thank you @Runcorn ,
I’ll give it a try.
It would be nice if you can block the texts on the result. This data shouldn’t be public.
Hey @Runcorn ,
I tried the text with your replacers but it still cannot parse it;
Thank you for your effort and I think this is a weird problem for this platform
I think there, is a double quote in the heading of the CSV that is causing this issue. Maybe try replacing the double quotes or, replace " with an empty string.
1 Like
I tried your solution in a text editor and it works and shows all the characters but the main problem in here not about quotes. It doesn’t even replace the \u0000 character.
It looks like it doesn’t see it somehow.
Hey @Runcorn ,
Finally!! Needed the regular expression!
{{replace(130.CommaSeperatedText; "/\u0000/g"; emptystring)}}
2 Likes