Create four header name in excel

I need to create four header name in excel.So this is better approach create four different write range under workbook to create header or do it another way…?

Hi @Aditya10989
Use Build Datatable Activity and bbased on that you can do the write ranges

Thanks
Ashwin S

1 Like

I have excel sheet in this 15 column exist.Now I need to add four new column in existing excel sheet.This is done by build datatable.
Now I click on data table add column in Build datatable and create new variable in data table with name of dt. Now what I need to do…?

I am trying this getting error as mention in attachment.I want to add header in AJ,AK,AL,AM,AN,AO

Hi @Aditya10989
Try to set it as empty like “” or leave it

Thanks
Ashwin S

It remove the header name in column A,B,C,D,E,F

1,2,3,4,5,6 I just want in end in AJ,AK,AL,AM,AN,AO

@Palaniyappan

1 Like

Pass Range as “A1” instead of “AJ”

not work

Hi @Aditya10989,

The Range you are passing in ‘Write Range’ activity is wrong. Just Pass “A1”

Refer to screenshot below:

image

this will create in starting as mention in attachment.I just want in end from BJ. I have sheet in this 15 column exist.

I need to add four new column in existing excel sheet.

1 Like

we can do this with a ADD DATA COLUMN ACTIVITY
like
–we can use EXCEL APPLICATION SCOPE and pass the filepath of excel as input and inside the scope use READ RANGE ACTIVITY and get the output with a variable of type datatable named dt
–now use a ADD DATACOLUMN activity and mention the column name and the datatable and type of that column so that it will get added to the last
–use n number of add datacolumn activity so that it will add the datacolumn to that datatable

–then we can use WRITE RANGE ACTIVITY so that the datatable can be written back to the excel with those four new columns

Cheers @Aditya10989

thanks for reply.As you mention read range activity this read the excel data.But the excel data is huge So I take 4-5 hours to read So I don’t want this.we can’t directly insert 4 column in existing excel sheet.I just want to add column not data.I just want add header in AJ1,AK1,AL1,AM1,AN1,AO1.
We can do this By using write range under workbook.But I think this is not a good way for 4 header I used four write range.So next time the requirement is 10 then need to create 10 write range.
This wan’t work create build data table then create 4 column in this add pass to data table variable and then use excel Application scope to fetch excel file and use write range …??

hmm…may i know the data records count
as usually read range wont take much time
@Aditya10989

As mentioned in screen shoot untitled its contain above 3 lakhs records.I just want add column in this existing excel file AJ to AO.

@aditya.prakash

can anyone suggest