excel-worksheet-tools
Reactive icon

Excel Worksheet Tools

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 4 Aug (2 days ago)
 by 
0.0
 (0 ratings)
excel-worksheet-tools

Excel Worksheet Tools

Documentation
1.0.0

Excel Worksheet Tools

Provides utility actions to modify worksheet properties in an existing Excel workbook without recreating the workbook. The extension works with Excel workbooks (.xlsx) represented as Binary Data and allows applications to customize worksheet appearance and behavior after the workbook has been generated.

Typical use cases include highlighting worksheets with validation errors, hiding or showing worksheets, renaming worksheets, protecting worksheets, and selecting the worksheet that is displayed when the workbook is opened.

  • SetWorksheetTabColor

Description

Sets the tab color of a worksheet in an existing Excel workbook.

If a valid HTML color value (for example, #FF0000) is provided, the worksheet tab is updated with the specified color.

If the Color parameter is empty or null, any existing custom tab color is removed and Excel's default tab color is restored.

This action modifies only the specified worksheet and returns the updated workbook.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
SheetNameInputName of the worksheet whose tab color should be updated.
ColorInputOptional HTML color (for example #FF0000). Leave empty to restore the default tab color.
ExcelFileOutputUpdated Excel workbook.

  • SetWorksheetTabColorForMultipleSheets

Description

Updates the tab colors of multiple worksheets in a single operation.

Each record in the TabColors list specifies a worksheet name and an optional HTML color.

If a color is supplied, the worksheet tab is updated with that color.

If the color is empty, the worksheet's custom tab color is removed and Excel's default tab color is restored.

Using this action is more efficient than calling SetWorksheetTabColor repeatedly because the workbook is opened, modified, and saved only once.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
TabColorsInputRecord List containing worksheet names and corresponding tab colors.
ExcelFileOutputUpdated Excel workbook.

TabColors Structure

AttributeDescription
SheetNameName of the worksheet.
ColorOptional HTML color (for example #00AAFF). Leave empty to restore the default tab color.

  • HideWorksheet

Description

Hides the specified worksheet.

The worksheet remains part of the workbook and all data is preserved, but it is not visible to users when the workbook is opened until it is made visible again.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
SheetNameInputName of the worksheet to hide.
ExcelFileOutputUpdated Excel workbook.

  • ShowWorksheet

Description

Makes a previously hidden worksheet visible.

If the worksheet is already visible, no changes are made.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
SheetNameInputName of the worksheet to show.
ExcelFileOutputUpdated Excel workbook.

  • RenameWorksheet

Description

Renames an existing worksheet.

The worksheet content, formatting, formulas, and position within the workbook remain unchanged. Only the worksheet name is updated.

If the specified worksheet cannot be found, no changes are made.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
OldSheetNameInputCurrent worksheet name.
NewSheetNameInputNew worksheet name.
ExcelFileOutputUpdated Excel workbook.

  • ProtectWorksheet

Description

Protects the specified worksheet against editing.

An optional password may be provided. If a password is supplied, users must enter the password to remove worksheet protection in Microsoft Excel.

This action protects the worksheet only. It does not encrypt the workbook or protect workbook structure.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
SheetNameInputName of the worksheet to protect.
PasswordInputOptional password used to protect the worksheet.
ExcelFileOutputUpdated Excel workbook.

  • UnprotectWorksheet

Description

Removes protection from the specified worksheet.

If the worksheet is not protected, no changes are made.

This action affects worksheet protection only and does not modify workbook-level protection.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
SheetNameInputName of the worksheet to unprotect.
ExcelFileOutputUpdated Excel workbook.

  • SetActiveWorksheet

Description

Sets the specified worksheet as the active worksheet.

When the workbook is opened in Microsoft Excel, this worksheet is selected and displayed first.

This action changes only the initial worksheet displayed to the user. It does not modify worksheet content or workbook structure.

Parameters

ParameterDirectionDescription
ExcelFileInputExcel workbook as Binary Data.
SheetNameInputName of the worksheet to activate.
ExcelFileOutputUpdated Excel workbook.


Notes

You may also want to include these notes in your documentation:

  • All actions expect a valid .xlsx workbook as Binary Data.

  • If the specified worksheet does not exist, the workbook is returned unchanged.

  • These actions preserve all workbook data, formatting, formulas, and worksheets except for the requested modification.

  • The extension is intended to be used after generating an Excel workbook, such as with the Advanced Excel component or other workbook-generation libraries.