2.16.3.15 Details of TreeNodes in Import ISF


Options

The Options tree specifies all import options for the impISF 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.RenameSheet:=1
Options.Names.SheetTrimFNameFrom:=1
Options.Names.SheetTrimFNameTo:=4
Treenode Label Type Default Description
AutoReNames 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.
RenameSheet Rename Sheet with (Partial) Filename int 1 Enable this to use part of the file name as the worksheet name.
SheetTrimFNameFrom Trim Filename From int 1 Specify the start of the name.
SheetTrimFNameTo Trim Filename To int 0 Specify the end of the name.
RenameBook Rename Book with (Partial) Filename int 1 Enable this to use part of the file name as the workbook name.
BookTrimFNameFrom Trim Filename From int 1 Specify the start of the name.
BookTrimFNameTo Trim Filename To int 0 Specify the end of the name.
RenameBookLongName Rename Long Name for Book only int 0 Enable this to change the long name for the workbook only.
IncludePathForBook Include File Path when Renaming Book int 0 Specify whether the file path should be included in the workbook name.
AppendBookComm Append Filename to Workbook Comment int 1 Specify whether the file name should be appended to the workbook comment.
AppendSheetComm Append Filename to Worksheet Comment int 0 Specify whether the file name should be appended to the worksheet comment.
AppendColComm 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 if the file name should be put to the column User Parameter row "SourceFile".
IncludePathForComm Include File Path when Appending Filename int 0 When this is enabled, the import file path is appended to the workbook's comment and/or the Comments row.

Script

The Script branch of the Options tree specifies the LabTalk scripts to run after file(s) being imported.

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

Example:
//Plot second column for each imported file  :
options.scripts.ScriptAfterEachImport:="plotxy 2;";

Treenode Label Type Default Description
ScriptAfterEachImport Script after Each File Imported string "?" Specify LabTalk scripts that will be executed after each imported file.
ScriptAfterAllImport Script after All Files Imported string "?" Specify LabTalk scripts that will be executed only after all files being imported.