© Matti Mattila, CPFA, CISA, CIA

TexEdiMac: Remove empty Lines

Previous item Next item Previous menu
Test Design
Picture 1
Picture 2
Picture 5
- In picture 1 a file (source file) is shown that will be used in demonstrating 'Remove empty Lines'-functionality of 'TexEdiMac' (later renamed as 'TexEdi') macro.
- There is text only on the area that appears blue in picture 1. In the demonstration we will remove all empty lines, including lines where there are only spaces.
Running the macro
- The easiest way to run the macro is pressing simultaneously Ctrl + Shift + 't'.
- At the beginning of the run you are shown the form in picture 2. Select 'Remove empty Lines'.
-
Next the macro tells what it does (picture: [1]). Read the information, and [click 'Yes' to] proceed, and you will be asked to select a source file. Please, click 'Yes' ('Kyllä' = 'Yes' in picture 3). Search the source file, and select it.
Picture 3
- In picture 4 'test.txt' will be selected.
- The macro suggests a name to the new file: the body of the name of the source file, with a bit different extension ('tx9 in stead on 'txt' in the example).
On the form (picture 5), where the file name was suggested, you can change the extension of the [resulting] new file, if you do not want it to be 'tx9'. You do not need to write anything in the box 'File extension is stead of 'tx9'' when you decide to use extension 'tx9' [2].
-
The macro tells the path and file name of the resulting file. [This information is not shown here; it would be 'D:/RemEmpLin/
test.tx9'.]
Picture 4
-
The macro tells the count of lines and the lenghts of the shortest and the longest lines in the source file (picture 6). You must decide, whether the [source file] lines containing only spaces should be left ('N') or removed ('Y').
Picture 6
- In the end of then run you will be told the number of lines in the new file.
Picture 7 Picture 8
The new text file
- The new file that resulted from the run is shown in picture 8. In the new file there are no empty lines.

[1] Text (to the left) on "Guidance" worksheet of "TexEdiMac.xls": what the macro does.
[2] The macro does not use special characters in an extension.