2.7.41 impinfo

Brief Information

Load  on imported file into a tree

Additional Information

X-Function not designed for Auto GetN Dialog.

Command Line Usage

1. impinfo trinfo:=mytree; mytree.=;

2. impinfo findex:=0 trinfo:=mytree; ;

3. impinfo ipg:=book1 findex:=1 fcount:=mycount trinfo:=mytree;

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 Page ipg

Input

Page

<active>

The worksheet to which some files have been imported.

File Index findex

Input

int

0

The index of the file that has been imported into the workbook. Note that the index of the first imported file is 1 and the index of the second imported file is 2... The default file index is 0, which corresponds to the last file that has been imported.

Info trInfo

Output

TreeNode

trInfo

The tree for outputting the information.
See more details in Description table

File Number fcount

Output

int

<unassigned>

Number of the imported file(s)

Description

The impinfo function is designed to read the information from the binary storage of the specified workbook. The function finds multiple files only when multiple files have been imported into New Sheets, New Columns or New Rows of a WorkBook.

Examples

The following code uses impinfo to get a file count for a workbook, then to retrieve the file path and name from storage:

impinfo ipg:=[Book2] findex:=0 fcount:=MyCount; // Just to get the file count
// Now loop for each file
loop(idx,1,MyCount)
{
	impinfo ipg:=[Book2] findex:=idx trInfo:=MyTree;
	str1$ = MyTree.Info.FilePath$;
	str2$ = MyTree.Info.FileName$;
	ty File $(idx): %(str1$)%(str2$);
}

Type MyTree.= in the Script or Command Window and press Enter to see the tree structure. A dot in the name is used to axis a deeper node as in:

PlotType = MyTree.FilterInfo.Display.iPlotType;
PlotType=;

Related X-Functions

impFile