TRUE CELL writing

Hi,
Can u help me please?
My output panel consist of
VEGETABLES
tomato
patato
pipper
FRUITS
apple
orange
banana
DRINKS
water
mıneral water
COLOURS
whıte
blue
red
and so on
I have excel sheet VEGETABLES(A1CELL),FRUITS(B1CELL),DRINKS(C1CELL),COLOURS(D1CELL)
how can my robot write excell sheet (TRUE CELL) ?
Have a good day.

Are you printing this to output panel using a list or array of strings?

If yes, follow the below steps:
Assign rowNumber variable to 2. Also create a string variable named “column”
Now you can use for each loop to loop through this list, and use string data type for looping item {
If(item = “VEGETABLES”)
{
column = “A”
}
else if (item = “FRUITS”)
{
column = “B”
}
else if (item = “DRINKS”)
{
column = “C”
}
else if(item = “COLOURS”)
{
column = “D”
}
else
{
use write cell activity to write data to cell and give cell value as column + “rowNumber.ToString()”
}
increment rowNumber by 1
}

Thank u for your helping
What ıs the dıfference column+“row.Number.Tostrıng()” and column+rowNumber.Tostrıng?

I’m sorry. “rowNumber.Tostring()” will directly consider everything as string. Ignore that and use rowNumber.ToString()

Please mark my answer as solution, if it helped you.

1 Like