How to append string variable value to excel file?

I want to append a string variable(txtString) to result.xlsx. result.xlsx has one column.

What activity I could use is and how to do?

Hi

If you want to add it to a specific row column cell of a datatable then use a assign like this

dt.Rows(rowindex)(columnindex) = Yourvariable.ToString

Where rowindex and columnindex starts from 0 for first row and first column

Cheers @greenlee

1 Like

@greenlee

If you want to append the string variable value to excel file

use assign activity and write as below
dt.Rows(rowindex).Items(columnName) = YourStringVariable

If you need to append inside the For Each Row activity
Then, declare a variable for Index property letā€™s say rowIndex
dt.Rows(rowindex).Items(columnName) = YourStringVariable
OR
row(ColumnName) = YourStringVariable

Hope this may help you

Thanks

1 Like

@Srini84
Yes, I need to append inside the For Each Row activity.
Iā€™m beginner So could you show me the flowchart screenshot?

@greenlee

Check below for your reference

Reference

Hope this may help you

Thanks

2 Likes

Hi @Srini84
Your video clip helps my full understanding.

How to learn more about writing code like ā€˜dtSiftTimings.Row(index).item(ā€œDifferenceā€)ā€™?

Thank you @Palaniyappan,

Itā€™s good help.

1 Like

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