2.15.3.6 Details of TreeNodes in Import BRUKER


Options

The Options tree specifies all import options for the impBRUKER X-Function.

Syntax: Options.Treenode:=<value>

Example: Options.FirstMode :=3 // Specify the import mode for the 1st file


Treenode Label Type Default Description
FirstMode 1st File Import Mode int 0 Specify the import mode for the 1st file. Options include:
  • 0:Replace Existing Data
    The data that exists in the target window will be wiped out. And the new data will be imported into it.
  • 3:Start New Books
    Create a new book for the file that will be imported.
  • 4:Start New Sheets
    Create a new sheet for the file that will be imported.
  • 1:Start New Columns
    Add new columns to the target worksheet and import the data into the new columns.
Mode Multi-File (except 1st) File Import Mode int 4 Specify the import mode from the list for the files other than 1st. Options include:
  • 3:Start New Books
    Create a new book for the file that will be imported.
  • 4:Start New Sheets
    Create a new sheet for the file that will be imported.
  • 1:Start New Columns
    Add new columns to the target worksheet and import the data into the new columns.

Names

The Names branch of the Options tree specifies how to name the worksheet and workbook.

Syntax: Options.Names.Treenode:= <value>

Example:

Options.Names.FNameToUDL:=1
Treenode Label Type Default Description
AutoNames Auto Rename Using File Name int 0 If this is enabled, Origin will use the default settings to rename the worksheet and workbook, which are:
  • Use the whole file name (not including the file extension) as the worksheet name.
  • Use the whole file name (including the file extension) as the workbook name if the current workbook is empty or the import mode is Replace Existing Data.
FNameToSht Rename Sheet with (Partial) Filename int 1 Enable this to use part of the file name as the worksheet name.
FNameToShtFrom Trim Filename From int 1 Specify the start of the name.
FNameToShtTo Trim Filename To int 0 Specify the end of the name.
FNameToBk Rename Book with (Partial) Filename int 1 Enable this to use part of the file name as the workbook name.
FNameToBkFrom Trim Filename From int 1 Specify the start of the name.
FNameToBkTo Trim Filename To int 0 Specify the end of the name.
FNameToBkLnOnly Rename Long Name for Book only int 0 Enable this to change the long name for the workbook only.
FPathToBk Include File Path when Renaming Book int 0 Specify whether the file path should be included in the workbook name.
FNameToBkComm Append Filename to Workbook Comment int 1 Specify whether the file name should be appended to the workbook comment.
FNameToColComm Append Filename to Column Comment int 0 Specify whether the file name should be appended to the column comment.
FNameToUDL Add Filename User Parameters Row int 0 Specify whether to put the file name to user parameter row SourceFile.
FPathToComm Include File Path when Appending Filename int 0 When this is enabled, the import file path is included to the file name (and the file extension is also included).

partial

The partial branch of the Options tree specifies how to partially import the file. Please note, the values set in this branch are using column groups(such as one X column and one Y column as a group) as unit, which is different with other data type.

Syntax: Options.PartImp.Treenode:= <value>

Example:

Options.partial.Partial:=1
Options.partial.FirstCol:=1
Options.partial.LastCol:=3
Treenode Label Type Default Description
Partial Partial Import int 0 Set it to 0 to disable partial import; set it to 1 or 2 to enable partial import. 1 means apply partial import settings to all files and 2 means apply partial import settings to all files except 1st file.
ColStartPoint From Column Point int 1 This is only available when Partial is enabled(set to 1 or 2). Specify the begin column point for partial import.
ColEndPoint To Column Point int 0 This is only available when Partial is enabled(set to 1 or 2). Specify the end column point for partial import.
ColReadPoint Read Column Points int 1 This is only available when Partial is enabled(set to 1 or 2) and "Skip" is larger than 0. Specify how many column point to read before skipping column point(s) for partial import.

Note that When you specify a number l for Read and a number k for Skip, l column points are imported while k column points are skipped for every l+k column points.

ColSkipPoint Skip Column Points int 0 This is only available when Partial is enabled(set to 1 or 2). Specify how many column points to skip after each reading for partial import.
ColRanges Custom String 1 Enter the index of column points(separated by space)to partially import the data, such as enter 1 3 5 7:10 12:0 will import col 1,3,5 then 7 to 10, then 12 to end.

Script

The Script branch of the Options tree specifies the script after the file imported.

Syntax: options.scripts.Treenode:= <value>

Example: options.scripts.ScriptAfterEachImport:="worksheet -a 2;" //Add n columns to the active worksheet after each import.

Treenode Label Type Default Description
ScriptAfterEachImport Script after Each File Imported string "?" The script will run after each file is imported.
ScriptAfterAllImport Script after All File Imported string "?" The script will run only once after all files are imported.