2.2.3.72 wstacksheets


Menu Information

Restructure: Stack Worksheets...

Brief Information

Stack Columns with Common Label from worksheets in a Workbook

Additional Information

Minimum Origin Version Required: 2022

Command Line Usage

1. wstacksheets -r 2 iwp:=[Book1] label:="Long Name" common:="Time Fine" filter:=<[<col("Fine")>0.5>]>;

2. wstacksheets iwp:=[Book1] label:="Long Name" common:="Count_ID CountData" idpos:=1;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Worksheet iwp

Input

WorksheetPage

<active>
Specify the input workbook. All wokrksheets in this book will be merged by matching labels.

The syntax is: ([BookName]

Matching Label Row label

Input

string

Select the column label row to be matched.
Common Label(s) common

Input

string

Enter a list of commom label(s) to search in the Matching Label Row. Multiple labels are separated by space. The column(s) with the matched label row will be output. Otherwise the columns will be ignored.
Row Filter (optional) filter

Input

string

Enter filter condition in a LabTalk string. Only data matching the condition will be output. For example, col(CountData) > 0
Dataset Identifier id

Input

int

2
Specify source dataset indentifier. Option list:
  • 0 = None,
  • 1 = Range,
  • 2 = Sheet Name,
  • 3 = Use index constructed in index to identify dadtaset source
  • 4 = Show sheet label of source worksheet.
Index index

Input

string

<auto>
Available when id = 3. Specify the index of the identifier.

Format is start:increment. For example, >code?1:2</code> will indentify source worksheets as 1,3,5,...

Insert Identifier Before Data idpos

Input

int

0
Available when id is not 0. Specify whether to put Dataset Identifier before or after data.
Skip Hidden Sheets hidden

Input

int

1
Determine whether to exclude hidden sheet(s) in Input Workbook from stacking: 0 = false, 1 = true.

You can hide a worksheet in the Navigate Worksheets dialog.

Output Worksheet ow

Output

Worksheet

[<new>]
Specify the output worksheet, see syntax here.

Description

This X-Function joins all worksheets in the selected workbook by matching specified column labels. See also this page.

Related X-Functions

wstackcol, wAppend, wjoinbylabel, wjoinbycol