How to get the datatable tablename in uipath

hi everyone…i am new to forum…i wanted to ask that …in uipath, how to get the datatable tablename in uipath…the datatable has been created in excel…
i am using datatable.tablename functions of c#, but it is not working for me…can anyone please help me out.

Hey! Can you, please, provide us a printscreen with your workflow in order to better understand what you want to achieve?

okay

@TheBOT
your statement looks fine. So what is the output from the MessageBox?

Sometimes the read range is setting a default tablename or let it is blank. For what purpose you will use the tablename?

output is DataTable…i was just trying the different c# functions and came across this one, but it was not giving the tablename, which has been used while creating table in excel.

but the function Datatable.Tablename is there and it should give tablename , which is what i read

you can assign like this
dataTable.TableName = "yourTableName"

1 Like

@TheBOT
Tablename is a property of the datatable

your access is with dtb.TableName is correct implemented.

using an assign as below let rename the tablename e.g. to the worksheet name
leftside (TO) - dtb.TableName
Rightside - “TheNewDataTableName”

but it was not giving the tablename, which has been used while creating table in excel

can you show us which name you are expecting?

1 Like


the tablename is highlighted in red…and that is what i am expecting as output

@TheBOT
when you have a look on the offered activities there is a create table activity. But the equivalent for reading is not there (at least on my end). we do it with read range and tablename is as implemented by uipath /.Net.

Have a look here:

there is mentioned:
Get TableName - Return table name . it helps to very the table exists or not before do the sorting.

maybe this works for you and you can set the retrieved tablename with the statement mentioned from above

2 Likes

thanks @ppr…will install the same and let you know.

1 Like