How to add String to excel sheet

I have Excel that I want to write into its column in each row “V”
I use the for each excel row activity.
how can I do this?
Big thanks to the helpers

Hi @mironb

  1. Excel Application Scope
    Input:

    • FilePath: “path_to_your_excel_file.xlsx”
  2. Read Range
    Input:

    • SheetName: “Sheet1” (or the name of the sheet where your data is)
      Output:
    • DataTable: dtExcelData
  3. For Each Row
    Input:

    • DataTable: dtExcelData
      Output:
    • CurrentRow: row
  4. Assign
    To: row(“V”) (or row(21) if “V” is the 21st column)
    Value: “Your Value” (or the value you want to write into column “V” for each row)

Hi @mironb

Try this

CurrentRow(“No”)=“V”+“” +CurrentRow(“No”).ToString

I/P:
image

O/P :
image

@mironb
Read Range: Input “Sheet1” and “A1:Z100” - Output: dtExcel

For Each Row: Input dtExcel
Assign: row(“ColumnNameToUpdate”) = “V”

Write Range: Input “Sheet1” and “A1” and dtExcel

@pravallikapaluri
Didn’t understand the assign

@mironb

Remove double quotes and reassign it

CurrentRow(“YourColumnName”)=“V”+“” +CurrentRow(“YourColumnName”).ToString

@mironb

CurrentRow("V") = CurrentRow("No").ToString

Regards

Remove double quotes from where ?

@mironb

In this
CurrentRow(“YourColumnName”)=“V”+“” +CurrentRow(“YourColumnName”).ToString

Remove double quotes and reassign it

Its not should be the opposite sides ?

@mironb

CurrentRow(“Creating a user”)

what i am saying is remove double quotes and reassign the double quotes

@mironb

image

NOTE: in the place of NO please mention the column header name you want to write

Regards

@mironb

CurrentRow(“Creating a user”)=“V”+“” +CurrentRow(“Creating a user”).ToString

In left side of Assign activity CurrentRow(“Creating a user”)
In right side of Assign activity “V”+“” +CurrentRow(“Creating a user”).ToString

Remove double quotes and reassign the double quotes

@mironb

Check whether the column Creating a user is Present or not

@pravallikapaluri
How can I check it ?
I put in range all of the cells includes the headlines

@mironb

Check on Has Headers option and Save after each row option in For each excel row activity

Note: No need to give range it takes whole sheet
You can give this Excel.Sheet(“Sheet1”).Range(“”)

Thanks !!!
its working now

1 Like