With this still little information I started to write the macro. It reformats the data and creates a tab separated value file. The date string will be already perfect reformated (hopefully) by inserting leading zeros where necessary. The macro property
Continue if a Find with Replace not found must be checked for this macro.
InsertMode
ColumnModeOff
HexOff
UnixReOff
Bottom
IfColNum 1
Else
"
"
EndIf
Top
Find "======="
Replace All "^p"
Find RegExp " ^([0-9]-[0-3][0-9]-[0-9][0-9] Account Number^)"
Replace All " 0^1"
Find RegExp " ^([0-9]-^)^([0-9]-[0-9][0-9] Account Number^)"
Replace All " 0^10^2"
Find RegExp " ^([01][0-9]-^)^([0-9]-[0-9][0-9] Account Number^)"
Replace All " ^10^2"
Find RegExp "%^(*^) ^([01][0-9]-[0-3][0-9]-[0-9][0-9]^) +Account Number ^([0-9]+^) +Total Charges +^([0-9.,]+^) +Name^(*^) Address"
Replace All "^1^t^2^tAct #^3^tTotal Charges^t^4^tName^5^tAddress"
Find RegExp " ++^t+"
Replace All "^t"
The next step would be to do what you can do manually with Column - Convert to Fixed Column with the macro. The problem is, I don't know the maximum width of all the information columns. The date and the account number column width is clear, but what is the maximum width of the other columns?
There is no macro command for Convert to Fixed Column. So the macro must replace each tab with an in every case sufficient number of spaces depending on the maximum width of every information column. Because this would still result in an eroded line layout, each column (information column, not character column) must be selected and left or right aligned in colum mode as it can be done also manually with Column - Left or Right Justify.
The last step of the macro would be to delete all columns which contain only spaces except the information columns separating blank columns.
I have this already done once as you can see in the hopefully well commented macro for the
Word Frequency Counter.
Maybe with these additional infos you can complete the work on the macro itself. If not, tell me the number of information columns, the maximum width of each information column and how each column should be aligned and I will try to complete the macro. A more useful example would help too.
Note: The 3rd information line does not contain the in my point of view (and for the macro) important keyword Address. Is this by mistake or are there really data lines in your file without the Address keyword.