2.2.3.22 merge_book

Brief Information

Merge multiple workbooks

Command Line Usage

1. merge_book;

2. merge_book fld:=project keep:=0 single:=0;

3. merge_book match:=wkblong key:="book*" rename:=sname;

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
Merge fld

Input

int

folder

The level in which the books will be merged.
Option list:

  • folder:All in Active Folder
    All books in the active folder will be merged.
  • recursive:All in Active Folder (Recursive)
    All books in the active folder(including recursive folder) will be merged.
  • open:All in Active Folder (Open)
    All opened books in the active folder will be merged.
  • project:All in Project
    All books in the project will be merged.
Keep Source Workbooks keep

Input

int

1

Whether to keep the source Workbooks.

Only Merge Default Workbook single

Input

int

1

Whether only merge the default first workbook, that is to say, if 1, only the books with single worksheet will be merged.

Key String Search at match

Input

int

none

Specified merge only matched worksheet. The match options is the following list.
Option list:

  • none:NONE
    No contondition
  • wkblong:Workbook Long Name
    Match the workbook long name
  • wkbshort:Workbook Short Name
    Match the workbook short name
  • comments:Workbook Comments
    Match the workbook comments
Key String(like:"?ook*") key

Input

string

The specified match key.

Rename Worksheet with rename

Input

int

lname

Specified the rename option
Option list:

  • lname:Workbook Long Name
    Use the original workbook long name as the new worksheet book
  • sname:Workbook Short Name
    Use the original workbook short name as the new generated worksheet book
  • wksname:Worksheet Name
    Use the original worksheet name as the new created worksheet name.
  • reset:Reset Worksheet
    Reset the worksheet name.
Output Worksheet owp

Output

WorksheetPage

<new>

Specified the output worksheet page.

See the syntax here.

Description

This function is used to merge the workbooks to a new workbook. Each workbook will convert to worksheet in the new worksheet page.