Add table column keyword not appending a column but gives no error and same with Clear table keyword, not performing the action

Open Workbook ${CURDIR}${/}Excelfile.xlsx
${Table}= Read Worksheet As Table name=Received data
header=True
Add Table Column ${Table} name=New scolumn values=${List_of_values}
Save workbook
close workbook

This is my robot script and the task passes without any error but column is not added to the table. Please let me know if anything is wrong in the script.

Once you do “Read Worksheet As Table”, you move from RPA.Excel.Files library to RPA.Tables library and association from worksheet is lost.

So if you want to modify Excel file, then stick to RPA.Excel.Files library keywords.

Thanks for your response.
But except for clear table keyword all other keywords i have used are from RPA.Excel.Files library and clear table is available only in RPA.tables library.

From documentation at RPA.Excel.Files library keywords

Read Worksheet As Table

Read the contents of a worksheet into a Table container. 
Allows sorting/filtering/manipulating using the ``RPA.Tables`` library.

That moves your to RPA.Tables library.

You will need to do this in three steps:

  1. open excel file and copy data to a “table”
  2. append new column to the “table”
  3. copy “table” back to Excel and save it

You should end up with code similar to this example:

    Open Workbook  ExcelFile.xlsx
    ${MyTable}=  Read Worksheet As Table

    @{MyValues}=    Create List    Sara    Beth    Amy
    Add Table Column  ${MyTable}  name=FooBar  values=${MyValues}

    Create Worksheet  New Worksheet
    Append Rows To Worksheet    ${MyTable}
    Save Workbook
2 Likes