How to paste multiple strings data to excel

for eg
str1=“a”
str2=“b”
str3=“c”
str4=“d”
how to add these data to excel columns

Hi @vnsatyasunil

  1. Within the Excel Application Scope, add a “Write Cell” activity for each string you want to add to the Excel columns.
  2. Configure each “Write Cell” activity as follows:
  • Set the “Cell” property to the desired cell reference, e.g., “A1” for the first string, “B1” for the second string, and so on.
  • Set the “Value” property to the respective string variable, e.g., str1 for the first string, str2 for the second string, and so on.
  • Set the “SheetName” property to the name of the sheet where you want to write the data.

Thanks!!

Hi @vnsatyasunil,

User for each and use in value like this {“a”,“b”,“c”} then user Add Column activity in for each body and pass the currentItem variable

Thanks,

Hi @vnsatyasunil

would it always be like 4 columns?
If so just build a datatable with 4 string columns name it newDT.
use Add Data Row Activity and pass these as array row {str1,str2,str3,str4}
and newDT as DataTable.
Use WriteRange to write this in Excel.
that would do.

Thanks
Happy Automation!!! :smiley:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.