I’ve been testing various solutions from the forums with nothing working for my issue. I have csv files from a vendor that have a delimiter of Ç. The files are in ANSI format. I’ve checked the encoding page, https://docs.uipath.com/activities/docs/supported-character-encoding, and it does not list ANSI as an excepted format. Inserting ANSI as the encoding throws an error that it is not supported. I’ve tried reading the file in as text and using a Replace function to replace the delimiter with a semi colon. This just changes the delimiter to a black box with a question mark in it.
I am currently reading the files with Visual Studio and uploading to a SQL database. My project is to convert off VS. The other issue I have in UiPath is the line delimiter needs to be CRLF. These files have lines that sometimes end in LF due to the end user entering a return character. I only need the line to break if it ends wit CRLF.
I know I will need to do multiple steps here, but if anyone has guidance I would greatly appreciate it. I’m running the community version, 2022.12.0 currently to prove POC.
Here is a sample of the data. Please note this is customer information so I cannot share the file.
After I read in the text file and generate a data table from text I get this.
I’ve tried exporting back to csv or Excel just to read it back in, but I never can get UiPath to deliminate. All data still returns in 1 column per row.
That got me mostly there. I had to change the encoding to “us-ascii” in step 1, and then the delimiter in my Split became “?”, in step 4. Not sure why that was the case but using UTF-8 and the Cedilla delimiter would never split the cells. After that and creating some variables to send 0’s and nulls into my SQL table, it is now working.
Thanks again for the assistance. I was thinking Split was the answer but had never had to use it before.
Update. Today I ran into an issue with using us-ascii as one of the files contains a comment field and it had a ?! in the comments. Since I was using the ? as a delimiter this threw off my insert command to sql. I looked back and @dokumentor was correct in using the utf-8 encoding. Once I read the file in utf-8 encoding, it changes the delimiter from Ç to �. I then use the following to split out the lines: Item.Split(“�”). This properly split out each field and it no longer is giving me issues when there are question marks in the data.