Enter data respect to column name

Hi @aksh1yadav @arivu96 @dominic ,

Need your support to solve this issue, i have tried a lot :frowning:

Ref my screenshots and discussions with Mr.Steve.

I have concern, My process flow is below :

  1. Open Excel-01 and read few cells and stored it as Variable
    2.Open Excel-02 and apply filter - Do filter by using saved variable
    3.End of Filter you will have only one row - Compare qty column from Excel 1 and Excel - 2
    4.If both the qty is matching i need write one of saved variable in column name " OLS AVAIL ID"

i can able to do step 1 to 3 but step 4 is not working for me, i tried to put message box its correctly reading the data in the respective cell but when i use write cell its not working.

Can someone help me to solve this concern.

Regards,
Lawrance A

Hello @Lawrance_A,

It’s normally a good idea to post your .xaml file (and the excel files that your program uses), when asking about specific questions like this. It makes it much easier for us to try and help you.

Cheers.

Hi Steve,

i have attached my Xaml file and i need to enter data in Column Q in attached Excel file if the criteria matches.

Hope this will help you to understand better

OD_020818 - Copy.xlsx (543.3 KB)

Data Validation_V1.0.xaml (47.2 KB)

If you want to compare that the value in valQty is the same as filter2.Rows(0)(“QTY”).ToString you first need to change your valQty from Generic Type to String.

When you’ve done that, you can do valQty.Equals(filter2.Rows(0)(“QTY”).ToString)

There are also the options valQty.StartsWith or valQty.Contains that you can use, if you are not certain of the exact text within the cell.

HI Steve,

My concern is after comparing the data if qty matches i need to enter variable (valSLINum) into column Q of Excel file.

I need guidance how to enter valSLINum variable in excel file

And a Write Cell activity with valSLINum.ToString does not work?

what could be the syntax for cell range ?

image

You told me that it is “Q”+ DataTable.Rows.IndexOf(row)+2 (the +2 may vary whether or not that you have included headers or not)

This looks promising, i will try this

I am getting this error.

Could you send me the corrected xaml file? It seems like you have double quotes in there, you should only have quotes around Q

HI Steve,

Find the corrected xaml file, i tried with single quote but am getting below error.

Data Validation_V1.0.xaml (47.5 KB)

Try to copy paste this line inside the field instead:

“Q”+filter2.Rows.IndexOf(row)+2

Same error exists…

image

Try to put the +2 inside the parentheses, you might start getting some off-by-some errors, try adjusting the +x part.

Hi Steve,

Tried with parentheses also same error exists.

Hi Steve,

I could able to find the mistake but not solution :slight_smile:

When i tried with different sheet in same excel workbook its working i tried to Write cell in Sheet3 A2 its working but if i change it to Sheet2 there is a above error.

Any idea why this kind of error ?