Excel write value - rookie question


#1

Hi guys,

I am currently facing some problems with an excel file. The excel file contains thousands of 9 digit numbers in one collumn (collumn AA). I would like to so to say extract the values in the collumn and simply add 100 to all of these numbers.

I tried doing this but i am stuck on how to extract the data and input the data in the same cells.

Could anyone please assist?

Kind regards,

Matthew


#2

Steps,

  1. Fetch the excel sheet in a datatable by Read Range Activity and Excel application scope
  2. Iterate datatable and add 100 using For Each activity
  3. Paste the datatable in the excel sheet again using Write Range

#3

Thank you for your quick response! I read the range of the excel sheet. I only need the data from Collumn “AA” in this case so i used the get row item. i am not sure whether i am doing this correctly. How do i add the value to the current value? i have a feeling i need to use the assign value but i am unsure how in this case.

On a side note, the excel file contains another collum. (collum “AD”). this collum contains certain dates that need to be ammend (by adding 1 month to the current date). the dates are already in the date format in the excel file (1-jan-2019 for example). Could you provide any tips?

Your help is much appreciated.

Kind regards,

Matthew


#4

Hi @Matthewvz
You are correct, within For each row activity, you need to use 2 assign activities

  1. For adding values
    row(“coulmn1name”) = (row(“columnname”).ToInt32() + 100).ToString()

  2. For adding month
    row(“column2name”)= row(“column2name”).AddMonths(1)

~Rupesh