Rename Sheet Dynamic Action

About

The Rename Sheet Package Action is a crucial feature within automated workflows that allows for the seamless renaming of Excel sheets within a workbook. This action is particularly useful when managing dynamic Excel files, where sheets need to be renamed to reflect changes in data, project phases, or reporting periods. Automating the renaming of sheets ensures accuracy, consistency, and organization in Excel workbooks, making it easier to navigate and manage information efficiently.

Metadata tab

Rename Sheet Action - Metadata tab
 

  1. The Write Variables option ensures that the “Package Action” logs the variable values into the “Action vars before log file” before the action is executed and logs the updated variable values into the “Action vars after log file” after the action completes.
  2. This option is typically used for debugging and is not recommended in a production environment.
  3. It can be globally disabled through the options dialog .

Parameters tab

Rename Sheet Action - Parameters tab
 

Variables tab

The Variables tab defines the variables to be updated during the action’s execution.

Rename Sheet Action - Variables tab

Execution log tab

The Execution log tab is populated after the action is executed. Double click on the row to view the log.

Rename Sheet Action - Execution log tab

Example: Calculated Excel File Name

Pascal

Rename Sheet Action - Calculated File Name example - Pascal
  Script

begin
 Result:='c:\support\'+LeftString(GETSYSTEMVARIABLE('SYSTEM_DATE'),8)+'.xlsx';
end;

Python

Rename Sheet Action - Calculated File Name example - Python
  Script

from datetime import datetime
Result.Value='c:\\support\\'+ datetime.now().strftime('%Y%m%d')+'.xlsx'
  1. Check Excel File Action
  2. Merge Excel Files Action
  3. Change Excel File Extension Action
  4. Set Excel Cell Color Action
  5. Set Excel Cell Value Action
  6. Read Excel Cell Value Action
  7. Add Sheet Action
  8. Delete Sheet Action
  9. Keep Sheet Action
  10. Rename Sheet Action
  11. Set Active Sheet Action
  12. Check if sheet exists Action
  13. List Sheets Action

Problem description

  • Excel files are received via email.
  • Each file contains only one sheet.
  • Sheet names vary.
  • The sheet must be renamed to “DATA”.

Solution

Video Tutorial

Since each file has only one sheet, the simplest approach is to to save list of sheets into a file, store it in a variable, and use ths variable as Old Sheet parameter


For more technologies supported by our ETL Software see Advanced ETL Processor Versions

Confused? Ask question on our ETL Forum

Posted on November 14, 2025 • 3 min read • 450 words
www.etl-tools.com About Support Pricing Cookies Policy Term Of Use Privacy Policy License