Is it possible to make the DataTable name variable?

datatable
studio
variable

#1

In my question, I mean that is it possible to add number of sheets from Excel simultaneously into different DataTables. Can the DataTable be made variable such that each time new name of the DataTable is generated.
Please comment.
Thanks
Chandramita


#2

@Hiya21, sorry if it was not your question. As far as my understanding you can use the same Datatable variable to reuse.

Let’s say you read sheet 1 and store it to dt1 perform operations you need to do and clear Datatable then read sheet 2 and store it to dt2 likewise

Regards,
Dominic :slight_smile:


#3

This is not possible with only 1 build data table activity I suppose, will try it once.


#4

Hi @Hiya21,

you can use the same variable, but you need to create column again and again if the column is differ.

if you are reading data from Excel and do some operation and write into another excel means no need to create build data table.

before you assigning datatble value assign datatable to null value or create a new object.

Regards,
Arivu


#5

Hi @Hiya21,

Suppose if you are reading data from Excel sheet using read range activity, already used datatable also you can direclty assign it will automatically clear the datatable object what you are using previously and it ll assign new record to the datatable as per the excel sheet.
No Need to clear the DataTable

Regards,
Arivu