© Matti Mattila, CPFA, CISA, CIA

ImpAny: Advanced Import

Previous item Previous menu
Revised 15.03.2011; 1005.2011

Advanced Import

Picture 1

-

In advanced import several filter values are applied when importing lines to Excel, or to a new text file. Each line in the source file, where any of the filter values is met, will be imported. If the option 'all EXCEPT those lines:' is checked, the opposite takes place.

Select a File

-

Start the run by pressing Ctrl+Alt+'m'.

-

First, you are shown contents of certain cells abut the macro in 'Guidance' sheet. Then you will be asked to select a file for import. Browse to find a text file and select it.
Steps for selecting a source file are not descibed here more closely. You can see more information about them e.g. on a page, where functionality of 'ImpFix' is described.

Fill in the Form

-

In order to be able to use multiple filter values in import a user shall write "%xx%xx" in the box '(%xx%xx when strings in a file)'. Fill in the form [showed in picture 1].

-

The macro suggest a [default] name of the text file where to import the selected lines (picture 2). The suggested name has the body of the source file with a bit different extention (here 'G98.sal' >> 'G98.sa9'). You can change the file name.

Picture 2

Picture 3

-

The macro asks maximum count of filter values to be applied in import (picture 3). The purpose of this dialog is (1) to ensure that not too much memory is reserved and (2) while ensuring the possibility tto use even the longest filter value lists.

-

For practical reasons strings servings as filter values will be supplied in a text file (criteria file). In the file each criterion shall be on its own line [1].

-

Would several filter values validitate a sorce text file line for import, only the longest of them will be added to the line in import when 'Add criterion after each line' is checked.

-

Please note that appication of filter values is case sensitive. When 'No difference between upper/lowercase letters' is unchecked filter values will be applies as their are written in criteria file.

-

Even though one would check 'No difference between uppercase and lowercase letters' the imported lines will be as they are in the source file.


[1] Example of a criteria file:
You can make a criteria file e.g. with notepad. Strings, and accordingly each line in the criteria file, can vary in length.

Picture 5