I have a some 100 records in Excel . So I need to fill one static value like “SAMPLE” in Column A. But it will depend upon the count of B. It may be dynamic. Next time, If Column B is 200 records then I need to fill 200 “SAMPLE” keyword in column A. Please help.
In Excel Application Scope,
Use Read Range Activity, to read the Column B (Range value: “B:B”)
So the output will be saved to a data table.
Count the no.of rows in data table, count = datatable.Rows.Count
Then you can use write cell activity, Range = A1, value = count.ToString + “SAMPLE”
Regards,
Karthik Byggari
Hi Kartik, I tried, but its not working. It would be reallyy appreciable, if you can attach a sample workflow. Need it urgently.
Currently I do not have access to the studio.
Can you please describe what error you are getting. So I can help you.
There is no error. it just giving the count…nothing else in write cell
Once you got the count (in a variable), use the following activity with the following value and give the range (e.g., “A1”)
Count.ToString + " SAMPLE"
- Create Sequence " Count record".
- Add “Excel Application Scope” activity.
- Inside Do add Read range activity. specify range eg: A1: A2
- Store output into extractData variable
- Create count variable and assign it as follow:
count = extractData.Rows.Count - Add “Excel Application Scope” activity.
- Add Write cell activity and specify range “A1:A” + count
- Inter your input value “SAMPLE” here.
Hi Sandeep… How if Column A record is dynamic. How to specify the range. Every time I don’t know the range.
Got It . It would be like “A1”… Thanks a lot