Updating a Data Table - output from an Excel file

I am reading an Input Excel file and getting the following output data table :

le.
When I write the data table I cannot see these columns named as Column1, Column2 etc…

The problem is I need to add a new column to the Data Table and then write it to Excel. The new column is customer number. This new column is getting added to the first row of Column1, column2. How to remove this row of columns.

Hi @Rachita_Chauhan

To add the column name u can use the following code in invoke code

What i am suggesting is to build a datatable by adding the column name using build datatable activvity and then add the rows to that datatable by using add datatarow activity and write it to the datatable

For ur case where u say when u write datatable into excel file u can’t see the Column1 Column2 etc.

The reason is because u had to check the Add Headers in write range for getting that header
into excel file

Regards

Nived N

Happy Automation

I want to add the new column after “Amount” but it is getting added after “Column12”. I want to add the new column in 3rd row. How can I do that

?

Hi @Rachita_Chauhan

Dont u required the highlighted data?

I need that data too.

Try to use Read Range from cell A3. Then add your column and use a write range activity from cell A3 as well (make sure that AddHeaders is ticked in both activities)

1 Like

use add column activity to add new column