Is it possible to make the DataTable name variable?

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

1 Like

@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:

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

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

1 Like

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

Hi @arivu96 ,

I have use case where I have a Excel with 20 Lakh + records ( which will eventually increase each day) and I want to split this Excel into smaller chunks for processing.

The approach I am trying to follow is first read the excel and get the count. Divide this count by the number of sets of file I want. Eg I want to have 5 files with 4 lakh records each so I do (20,00,000/5)

Now I want to specify this range 0:5,00,000 then 5,00,001 : 10,00,00 in the read range activity so that I can have DataTables of 4 lakh records each. I am facing challenge here in giving dynamic variable inputs for (read range and DataTable naming).

Can you please help?