Rename Sheet Name to a Variable

I would like to rename a sheet name to a string stored as a variable. I then want to write the sheet to a CSV while keeping the same sheet name. Please help.

Hi @scott.luntz,
You can try below link for Rename sheet name:

Once you have rename the sheet follow below steps:

  1. Open Excel in the Excel Application Scope activity.

  2. Place a Get Workbook Sheets activity.

Get Workbook Sheets activity works only within Excel Application Scope activity.

3 Prepare a variable to store the acquired sheet name.

Select “Browse for Type

Enter “list” for “Type Name:”. Select “Systems.Collections.Generic List “.

Select “String” in the type selection

  1. Specify the variable prepared in “3.” in the Sheets property of the Get Workbook Sheets activity.

Place 5 For each activities.

Specify “String” for Type Argument, and specify “SheetsList” for Values.

The sheet name is displayed in the Output panel in the Write line activity.
Hope this helps, if it works mark as solution.
Thanks,
Neelima.

How can you specify the sheet name within the write CSV activity?

I don’t believe you have sheet names within a CSV file, hence why you cannot specify this in the activity. You can use the steps outlined above if the file is another format (.xlsx or .xls for example)

@scott.luntz

Check below

So ensure that you have the excel file with .xls or .xlsx instead of .csv

Hope this helps

Thanks