How use append activity to save a text

Hi, I want to use append activity to write the text in excel , how can I do that ?

Read the text parse it to datatable for each line as item aaray and add to data row
then using append range activity appen the data in that excel

Which activity I can use ?


Please share the screenshot of input files and workflow also to provide excact solution

@homyz if you want to append rows on to an excel file please use the Append Range activity.

Append a text we need to first assign that text to a datatable or similar format of the present excel
So use BUIDL DATATABLE activity and create a similar column structure as we have in excel and then get the output with a Variable of type datatable named dt
—then use add Datarow activity where in the Datarow property mention as dt.NewRow and in datatable property mention as dt
—now use assign activity like this to insert that text you have to that row we created in the previous step
Like this
dt.Rows(rowindex)(columnindex) = “your text value”
Where both row index and column index starts from 0 for first row and column

Then use APPEND RANGE activity with dt as input inside the EXCEL APPLICATION SCOPE and that would append that datatable to the excel

Cheers @homyz

Hi Paras,

The process as below, but when I open the excel , nothing is in excel. Could you help me ?




1 Like

you are using wrong activity first extract all the data which you want to append in excel add store in a array
then create a dataTable variable and using build dataTable build datatable for single now using for each for that array add to datarow in that datatable after that using append range workbook activity append all the data in that excel

hope this will work for you!!

@homyz this will work when you append the data in text file just change the .xlsx to .txt it will work.

Hope is it resolved if not please let me know