Hi, I am reading 2 cells from an excel file. The first cell is number in text format and goes from 01 to 12. The second is a formula that shows the year. So the value is “2017” and has its format set to general.
The first read works fine and the second one gives me the following error: “StringConverter cannot convert from System.Double.”
Both output variables are set as “String”. Can some one help me out?
Format in Excel file is just used to determine how to DISPLAY data on EXCEL FILE. It doesn’t affect data type in datatable in UiPath.
I guess UiPath recognizes columns as Double when the cell only contains numbers (but if it starts with zero and is followed by another number, UiPath recognizes it as String)
Therefore, you have to set data type of the variable for year to “Double” or “GenericValue”.
Please completely delete output value of Read Cell activity and enter GenericValue type variable name.
You must be able to use GeneicValue as output of Read Cell since UiPath doesn’t know what type of value is coming into the variable!
Generic type should work. i tried now.
Could you please remove the ano from output field and come out and moment later pass again. ReadNumber.zip (8.4 KB)
Hi,
facing a similar problem. Can you please tell me which option to select exactly to get the double or generic data type. I am selecting system.double by going to “browse for types” option and upon execution i am getting a validation error in the workflow.
Hi,
I solved this error using cint keyword that cast the variable ano to int. After you achieve the year from the excel file you could use assign activity and cast the achieved data to int. I hope that could be useful.