How to read cell from excel and type in another application


#1

Hi :slight_smile:
I’m building a simple robot which can read the cell from excel and type text in another application.

Right now I have a problem, because Uipath don’t allow me to convert cell from excel to text and use it in “type into”.

I try to use other variables but always is a problem with one on that.
My screenshot:


How could I do it in the easiest way?
Regards,
Bartek


#2

Hi there.

wartKomorki is a DataTable variable type. So if you want to store the entire table you need to use Read Range activity.

If you want to use the Read Cell then you can delete the Assign, cause wartKOMout is already the text you want to use in the TypeInto.

So simple way would be to delete that Assign activity, cause the Read Cell stores the text to wartKOMout already to be used in the TypeInto.

Depending on what you are wanting to do, however, using a Read Range to store the table to the DataTable variable might be useful for looping through each row.

I hope that helps answer your question.

Regards.


#3

Not really, because I delete Assign and I have error that “it can’t convert System.Data.Data.Table to String”.

So how to convert text from Data.table to string? because I need to read one cell.


#4

Which variable is your output of the read cell activity? Because if it’s the datatable variable, you’ll need to change it to the string variable if you’re only readying 1 cell.


#5

My output variable is wartKOMout.

Because I want to read one cell from excel and type into in application.

Right now, I do it i that way:

Rade Range (use one cell “B2:B2”)
use Output data table and convert data table to String.

It works, but it write “Column1 and value”. How to delete this Column 1?
delete-column1


#6

If you need to read a specific cell why are you using Read Range? Use Read Cell instead and it will return a single value not a DataTable :slight_smile:

Regards,


#7

I use and I have error:
error-read-cell

Because I don’t know how to covert Variable DataTable to String.

End I do something new, and I have an error:


#8

Hi @Bartek,

User the Output data table activity.

or

To Get the First row and first column value . You can use wartKomorki.Rows(0)(0).ToString.

Regards
Balamurugan


#9

I use this Output data table. Maybe variables have wrong variable type?

Where to put this wartKomorki.Rows(0)(0).ToString?
In read Cell?


#10

wartOUT is a String, so put that variable in the Output property of the Read Cell.
Then, in the message box put wartOUT.ToString

If you do choose to use Read Range where you show above where you have “Column1”, you don’t need the Output Data Table activity. Instead, in the Message box just put wartKOM.Rows(0).Item(0).ToString.
That will output the first row of the table and first item. If you want a different item, change the 0 to a different number.

Regards.


#11

Hi @Bartek,
If possible, Can you share the source ?

Regards
Balamurugan


#12

Yes, the source in attachment. read-excel.xaml (6.1 KB)
Even when I change the Variabe to String I had an error:


#13

I works with “wartKOM.Rows(0).Item(0).ToString.”

Where I can read more about this “rows” .ToString, etc"?