Hello friends,
@rkelchuri , @Ninett_Panfir , @Rammohan91 , @balupad14 , @Florent_Salendres , @vvaidya , @Palaniyappan , @ClaytonM , @vvaidya
how is it possible to append subsequent strings at the end of an array (which is initially empty)?
Thank you so much,
Cami
HareeshMR
(Hareesh Madasi)
August 5, 2019, 2:08pm
2
@CamiCat ,
You can get the length of the array using array.length.
Then use assign activity as
array(count+1) =
“value you want to append”
I don’t know if it’s the best method, but I use the .Concat() when wanting to add items to arrays.
arrvariable.Concat({"newstring"})
or you can use an array variable inside the parenthesis.
Regards.
Oh also with my previous suggestion, the array initially needs a value, even if it’s an empty array. So initialize it as {}, if you can
Thank you so much @ClaytonM .
And hot to print all values in the array in an excel cell of an Excel file?
it’s a lista of name of files and I should report it in a cell.
Thank you,
Cami
To output an array to a string, so you can assign to a cell, you can use String.Join()
String.Join(", ",arrvariable)
HareeshMR
(Hareesh Madasi)
August 5, 2019, 2:22pm
7
That can be done in many ways @CamiCat ,
Use excel application scope
initialize a variable of type integer assuming as count
Loop through the array inside excel application scope
use write cell activity and give the value as item (for each value) and range as “A” + count.tostring
Increment the value as count = count + 1
Thank you so much for your precious help @ClaytonM .
Thank you so much @HareeshMR for your help.
Cami