Add new column name in data table

I want to add new column name and data in this existing excel sheet.For data I have done calculation and for add more column name I added column in build data table.

1 Like

Hi Aditya,

I understand that you want to add a new column. May i know why a Add Data Row is used here?

Try using Add Data Column to add a new column.

To Add a new column name/heading, it should be the first row’s value of new column added, assuming, existing datatable contains a header row already.

Thanks,
Arun

2 Likes

Hi @ArunVelaayudhanG thanks for reply I stuck this last three days did not got any solution.
I have a excel sheet lets suppose it contain 11 column now I want 5 more column in this in last means 15,16,17,18,19.

Read File In Excel Application Scope
Then Read Range:— Datatable
Use add data column to Datattable and give column Name
Once you use write range it will print old plus newly added columns
U can use those columns before write range for your data massaging

1 Like

thanks for this I have few question

  1. It will add new column in last I have 11 column now I want 5 more column in this in last means 15,16,17,18,19…?
  2. For insert 6 column then I need to use 6 time add data column…?
  3. and 6 write range…??

You just need to add 6 data columns
or by using counter you can loop it for creating those columns n number of times.
Write range will be used at the end of the data massaging
so it will write entire datatable

counter and loop concept I did not understand.In First you gave me solution which I understand.For this I need to add 6 add data column and 6 write range…?

  1. It will add new column in last I have 11 column now I want 5 more column in this in last means 15,16,17,18,19…?
  2. For insert 6 column then I need to use 6 time add data column…?
  3. and 6 write range…??
    [/quote]

Hi @Aditya10989

Have you tried using insert delete columns activity
Thanks
Ashwin S

no.I did use this if this will insert column in last.Then Please suggest me how to do it.Thanks

as you mention I create demo application for this But I got this error


I try also this.Its executed but I did not got output as required I want column name this process gave me data in header