Receiving "Read Cell: StringConverter cannot convert from System.Double." on duplicated automation

I just copied an automation to try and get it functioning for another instance. When copying it automatically updated the workflow to the non-legacy version. The original bot is functioning perfectly in the legacy version and I am scared to touch it.

So the thing is, literally nothing is different, I just copied the files to their own folder and made it a new bot, changed a file path at the very beginning to my debug path, and hit play. I know the file path change broke nothing as it opens the correct folder, the first excel workbook, pulls the data needed and stores it, closes it, opens the 2nd workbook and goes to the first ReadCell and boom, “Read Cell: StringConverter cannot convert from System.Double.”.

I have tried all the suggestions I can find. I have tried changing the type to Generic (breaks everything underneath it). I have tried making sure my cells are marked as text, no luck. I have been working on this for hours and I really hope someone can help me.

Hi @Sammie_Fullmer

Make the output variable of Read Cell Activity Datatype to System.Object. Object accepts both strings and integers.

Regards

1 Like

This breaks a lot of my workflow to the point that I can’t even test again to see if it fixed the initial issue. None of my operations on either numbers or strings work, so am I supposed to change my entire logic scheme just to hope this actually worked?

And also, why is this even a problem when it works perfectly find every day in the original bot?

HI,

Can you try to use (temporary) variable GenericValue type or Object type at Result property in ReadCell?
Then use the following expression.

strData = temp.ToString()

Regards,

Does it matter than my Read Cell looks very different from yours?
image

Hi,

We can use both ReadCell activity regarding the above.

Regards,

I have it set as GenericValue and this is what I get.

HI,

For now, can you put new assign activity then input each variable again?

If it still doesn’t work, can you share information for type of each variable?

Regards,

Alright after a little playing I found I cannot use .ToString but it is happy without it and there are no more visible errors, but Read Cell never reads, it just hangs. I can step into and over it and it always reads ‘null’ when it should eventually, after a few loops, read “Notes” (among some null, 0, and 1’s before that).

Hi,

What version of Studio and UiPath.Excel.Activities package do you use?
If you use old Excel pack, can you try to upgrade to the latest stable?

and/or

Can you try to use Modern Excel : UseExcelFile and ReadCell?

Regards,

@Sammie_Fullmer

If you find solution for your query mark the post as solution to cloae the loop.

Regards