Unable to read CSV - Invalid format

datatable
excel
uiautomation
studio

#1

Hello Eevryone,

I am not able to read a csv file using “Read CSV” operator. It throws an error message as “Invalid format”

However I was able to open other CSV files earlier. The only difference between the CSV file which threw error and the other one is the date format.

File read successful - had date format in DD.MM.YYYY

File read failure - had date format in DD/MM/YYYY.

How can I read CSV with the date format as is. Even if I have to make manipulation to the data, I have to read to make changes. Is there any other approach to read CSV file and store it as datatable?


Shuffle rows - CSV to Excel - Using datatable
Merge Datatable - Unnecessary column displayed
Filter Datatable - Not like filter
Excel is Empty but DataTable output is blank when queried for rows count
#2

I don’t think that would be an issue, unless you have specified something wrong in the Delimiter.
i tried reading a CSV file with a value as DD/MM/YYYY and it worked fine.

Can you share a sample CSV with a couple of records? Masked data?


#3

F1.xls (351 KB)
F2.xls (271 KB)

Please find attached the files. As CSV’s cannot be uploaded, I have to save it as excel to send you. Excel will work but I want to know why CSV doesn’t work? Thanks for your response


#4

I am able to read both the files saved as csv, without any issues!


#5

Actually am not able to send it as CSV to you1

It is this format which is causing the problem. Am also not sure whether it is also the blank spaces


#6

But i still saved the same file you shared as csv and tried. Don’t know if the format is still the issue.
Can you zip it and share across?


#7

@kaderms - Hello Kaderms, Thanks for your prompt response always. I changed the delimiter to semicolon and it started working. Quite weird. Might be a bug. Not sure. Can you also please help me with the below issue?


#8

@kaderms - Can you please help me with this?


#9

@kaderms - Can you please help me with the below scenario?

For example - I have 5 fields (Name, Age, Salary, DOB & Occupation) - Cursor would initially be in the “Name” field. When I press tab for the first time (Cnt=1), it would move to “Age” field, When I press tab again (2nd time), it would be in “Salary” field and so on. But then what I would like to know is the total number of tabs possible in screen without repeating/navigating to the same elements.

For example - let’s say that few of the fields(Age, salary) are disabled, then tab would not take you to that field at all. In this case the total tab count would only be two whereas in first scenario, the tab count would be 5 because all fields are active. Please note that am working in citrix environment, so no option to find whether an element is enabled/ disabled. Image activity doesn’t work either


#10

In this case, I wouldnt go with the Tabs, unless combined with other ways to ensure that the fields are editable.
What all image methods have you tried?

Did you try using Find Image Matches activity? I havent tried this, but came across this one which might suit you in this case, to find all editable boxes on the application.