How to fill static value in column in excel

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"

  1. Create Sequence " Count record".
  2. Add “Excel Application Scope” activity.
  3. Inside Do add Read range activity. specify range eg: A1: A2
  4. Store output into extractData variable
  5. Create count variable and assign it as follow:
    count = extractData.Rows.Count
  6. Add “Excel Application Scope” activity.
  7. Add Write cell activity and specify range “A1:A” + count
  8. 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