Can we read the encoded value from excel to collection in blue prism

avvamma

New Member
Hi,

I am using get worksheet as collection using MS Excel VBO, but in output collection some character is getting replaced by "?".
I am not getting same value which is there in excel file, i could see in UI path we have one option as "encoding"(with ui path i can read the encoded value also)
Do we have something with Blue prism or is there any alternate way can we solve this issue?

Regards,
Avvamma
 

VJR

Well-Known Member
Hi Avvamma,

- What is the actual character that is getting replaced by "?" ?
- Where do you see that option in UiPath? Meaning - during file open, or while reading the data?
- What is the encoding used - UTF-8, etc?
- Which Office version do you have?
- The file you are working with is a .csv or a .xlsx?

Lets try to check if there is some option for that.
 

avvamma

New Member
Hi VJ Thanks for the response

1) "ğ" is getting replaced by "?" when i read it from .csv to collection.
2) option is available "Read CSV file"
3) Its "UTF-8"
4) I am using BP v6.3
5)Its CSV file

Please let me know if you need more information.

Regards,
Avvamma
 

VJR

Well-Known Member
Hi avvamma,

I pasted the character you provided in an excel .csv file and ran the Get Ws as Collection.
I noticed that even though the character in the sheet is ğ, the character turned out to a question mark when the Show action was called and hence the Get Ws as collection is also showing up a ? in the collection.

View attachment 1542265865999.png


Moreover, I also noticed that the Code in the Get Ws as collection is reading the file in the standard Windows Unicode Text Format via the below line of code.

GetData(DataFormats.UnicodeText...

So can you make sure if its really a UTF8 encoding character and what encoding keeps the file as ğ character so that even when it is opened it does not show as ?, which then will end up in the collection as ğ .

I paused the running diagram after the Show action and wrote a ğ character in Column2 which then correctly showed up ğ in the collection as shown below.

View attachment 1542265995980.png


Yes you are right that the UTF8 worked in UiPath but I do not know more on it so can't tell you much of its working but wanted to understand of the function name that successfully returned the output (Read CSV file) .
Also take a look at the 'Get CSV Text As Collection' action of Utility - File Management which is specifically for CSV files.
 
Top