Write datatable to excel sheet using excel as db approach


I have a datatable with two columns of Employee ID and Employee name.

This datatable I fetched from sheet1 of Excel and I want to write it to sheet2 in the same excel.

I have tried to use insert query of database pack but no use.

Please provide solution to this


Hi @kalyan_g ,

Could you let us know what is the error that you recieve ?

Hi Arpan,

I have attached screenshots, please find them.

I am using below activity to get datatable output from Excel


Query: " Select [City], count(*) as [EmployeeCount] FROM [Sheet1$] group by [City]"

Output datatable:


I want to write this datatable to sheet2 in the same excel by below activity.


But I am getting below error:

Thank you,

@kalyan_g , Could you try adding the square brackets like you have did for the first query ?