Macro input commands

<< Click to Display Table of Contents >>

Navigation:  Macros > Macro commands and parameters >

Macro input commands

There are three ways to import data into a macro:

Read from a dialog

Read from a text file

Read from an Excel workbook

 

Read from a dialog

See:

Input: prompting the user for a value

 

Read from a text file

Using these commands, data can be input from a text file. The file has to be opened and a separator has to be defined. Data can be read from one line or from multiple lines of text. Afterwards the file has to be closed. An opened file can not be written to at the same time. See:

TfOpenForRead: Open a text file for reading

TfRead: Read from one line of a text file

TfReadLn: Read from one line of a text file and go to the next line

TfEOF: Test end of file

TfClose: Close a text file

 

Read from an Excel workbook

Similar to reporting to a Spreadsheet using Write, Read inputs data from a Spreadsheet into the Macro. Firstly the data files have to be opened and assigned. A maximum of nine data files can be opened simultaneously. After the reading operations the data files can be closed so that other data files may be opened. After execution of the Macro, all opened files will be closed automatically. Read and write operations may be executed in the same session. See:

Open: opening a spreadsheet for Read

Read: reading a value from a cell on the worksheet of a spreadsheet

Close: closing a spreadsheet

 

See also:

Alteration: changing the network or variables

Arithmetic functions: functions for rounding, square, logarithm an goniometry

Procedures: user defined procedures

Conditional actions: executing or skipping parts of a macro, depending on a value

Loops: repeatedly executing or skipping parts of a macro, depending on a value

Calculation: determining results

Reporting: entering data into Excel cells or formatting them

Network actions: saving networks modified by the macro

 

Back to Commands and Parameters.