How to Rename the excel sheets based on Headers

Hi,

I want to rename the excel sheets based on the headers it contains. Can anyone help me.

Regards,

@raju_alakuntla

Use read range check the headers as you need and then use the column name or whatever you want to using rename sheet activity

cheers

I want to change the sheets name based on the headers it contains. How can I do it.

Regards,

Hey,

Can you read the excel first into a datatable. Then you could loop on column names Dt.Columns, inside that use Rename sheet activity

@raju_alakuntla

read the excel

find out your columns are there or not

depending on it use the name

cheers

Thanks Anil. I could able to rename it.

we have used the assign activity to get the file. so we used array of string variable to store the Directory.Getfiles(file name). so now we need to we need to pass the array of string to the use excel scope file. We are getting error as it is array of string.

How can we convert array of string to string.

Regards,

@raju_alakuntla

If its only one file then use output(0)

If multiple loop the array and inside use currentitem to get each file

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.