Can't access a table variable

i successfully loaded data from an excel file and it is saved in a variable but i can’t access it, i followed the steps of this tutorial: https://robocorp.com/docs/courses/beginners-course/filling-in-the-sales-form-using-excel-data
but when i want to access a table atribute it rises an error.
I leave a screenshot below:

What am i doing wrong?
Thank you in advance

Welcome @maurosouto27

on first sight, it looks like the header of your table is without space between the words but your rtable index does have a space:
Table: FirstName
Table index: First Name

Could you check this, please.

Yes, sorry about that, it was because at first i tried with a space between words like in the tutorial but didn’t work so i removed it, and it didn’t work either.
I literally copied and pasted the tutorial example and doesn’t work for me
i’m using rpaframework==9.6.0 and robotframework==3.2.2
can it be an issue of incompatibility?

rpaframework should have a dependency to robot framework…so you do not need to add it separately w/o any special reasons.
What is your current error message?

My current error:

Jupyter

Funcion prueba | FAIL |
Table ‘${tabla}’ used with invalid index ‘First Name’. To use ‘[First Name]’ as a literal value, it needs to be escaped like ‘\[First Name]’.

I believe you are missing loop

2 Likes

Hi @maurosouto27 it seems that you successfully load the excel to ${tabla} variable, but then you try to access column First Name directly from that ${tabla}. That is not possible because you must first select a row from the table, and then access the column from that row. In the example that is done by looping all the rows of the table, and then calling Fill And Submit The Form For One Person for every row.
In your code that would be something like:

    FOR    ${row}    IN    @{tabla}
        Llenar prueba    ${row}
    END
3 Likes

ok, ill try this, thank you

Hello again, i tried that and i got the same error, if you see, it took ${row} as a table.
Any other idea?

I achieved to get the data using this syntax: ${tabla}[0][0] , that brought me “David”

Could you try it like in Teppo’s example?
For ${row} IN @{tabla}

1 Like

My bad, it worked perfectly, thank you all very much

2 Likes