I have a large file that i want to edit using a macro. The data in rows needs to be changed so that it is in the right position. The problem is that not all the data in all rows have the same length so if i create a macro for say row 1 and try to apply this for all rows it won't work.
You can insert tabs to align the data and then convert the tabs to spaces.
Step 1
You could record a macro to insert a tab between the name and date and between the date and school. Even though the data are different lengths, you should be able to use Ctrl+Left and Ctrl+Right to jump between words. Or you can search for the beginning of the date while recording the macro.
Alternatively, you can do a single find-and-replace operation using regular expressions.
First, enable POSIX regular expression syntax in Configure > Preferences > Editor. Then do a Replace as follows:
Find what: (.*)_([0-9]{12})_(.*)[replace the underscores with spaces] Replace with: \1\t\2\t\3
Select Regular expression and click Replace All.
Step 2
Click View > Document Properties.
On the Tabulation tab, select Convert existing tabs to spaces when saving files.