(Revised 31.03.2009; 29.09.2010)
|
| Purpose of the macro
|
|
|
|
The macro ['ImpFix'] imports an ASCII fixed length file (text file) or selected parts of it to MS Excel.
During the import the macro divides each imported text line into columns [cells]
of an Excel worksheet either in numbers or in characters
according to a record definition made by a user.
|
|
| Record Definition
|
|
|
An ASCII fixed length file is a text file where all lines have the same length.
Record definition is a description of a text file line.
The definition tells which positions of a line are dedicated to what data, and what type is that data.
A user makes a record definition on Excel worksheet 'Def' of the [macro] workbook
i.e workbook containing the macro [1].
|
|
|
There are two 'ImpFix' [macro] workbooks:
one for MS Excel 2007 (worksheets with 1.048.756 rows)
and another for older MS Excel versions (worksheets with 65.536 rows).
|
|
| Alternatives in Import
|
|
|
The macro offers three possibilities to make limitation what lines to import, and
four possibilities to choose where to import the lines.
|
|
| Other functionality
|
|
|
The macro makes several checks during the import:
does the record definition match lenght of lines,
are the source file lines equal in lenght,
what is the count of lines subject to import,
and is there enough free space for the data on the selected Excel worksheet.
|
|
| Composition of the macro
|
|
|
The macro consists of the following elements:
a source code;
a worksheet 'Guidance' containing guidance for a user;
a worksheet 'Def' containing record definition for the source file;
and two userforms.
|
|
| Download
|
|
An updated demo version of the macro ('ImpFix') is a part of demo of 'ExcAud' macro set.
You can dowload demo version of 'ExcAud' here.
|