Read Excel Row en Columns, no value = write into next available row

Hi,

I would like to automate a read and write into a Excel-document.
Reading will take place inside a webbrowser, that works fine.
Now writing into the Excel document is the part what troubles me.

Each row starts with a value in column A,
I would like to be able to count and read if there are any values filled within columns A, D, E, F
If not, let Uipath write into that row.

Thanks in advance!

Apologies, if possible to skip column A and start reading for values from column D.

Hi @sirwa

welcome to forum

I hope you are reading webtable and you are trying to write that into excel right, if yes use datascrapping feature of uipathn scrap the table and write into excel using write range

Regards,
Nived N

1 Like

Hi @sirwa ,

Can you please show what is your input and what you want in output ?

1 Like

Thank you for the quick response.

The following document is already existing and will be updated with the values taken from webapplication.

As you see, the rows where data is written starts from 5th (4th uipath).
Column A already has values. I need to verify if Column D, E and F are empty in the next available row, to input data in write cell with variables (this works).

Again, my appreciation!

Hi @sirwa
You are reading the excel and storing in dt1, now if u need to add a new row, use add datarow activity for your case

1 Like

Hi @sirwa ,

You can follow below steps:

1 - Read excel and strore output in data table ex - dt
2 - Use foreachrow activity to iterate each row one by one.
3 - In foreachrow body use if condition as " If Not String.IsNullOrEmpty(currentRow(“ColumnAName”).ToString) and String.IsNullOrEmpty(currentRow(“ColumnDName”).ToString and String.IsNullOrEmpty(currentRow(“ColumnEName”).ToString and String.IsNullOrEmpty(currentRow(“ColumnFName”).ToString

If above condition is true then update value

To Update Value use below expression in Assign acitvity
row(“ColumnNameYouWantToUpdate”) = Value

1 Like

Thank you for the response,

The following compiler error is issued:
Compiler error
Tried to solve it, no luck. I tried it also with a short version of the if condition.

Hi @sirwa

Seems to be some mistake with the if condition

Correcting it here

Not String.IsNullOrEmpty(currentRow(“ColumnAName”).ToString and String.IsNullOrEmpty(currentRow(“ColumnDName”).ToString and String.IsNullOrEmpty(currentRow(“ColumnEName”).ToString and String.IsNullOrEmpty(currentRow(“ColumnFName”).ToString

1 Like

Hi @sirwa ,

Check below xaml and please update column name with your column as i have just given dummy value their.
Test.xaml (6.6 KB)

Appreciated! unfortunately the XAML give the following error. It might be corrupted?Error

Refer this, Seems you have older version dependencies.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.