The file marking method
is very simple and works quite well in most cases.
However, when you have a large number of files with similar table structures
(but with different data) it may not be desirable to mark each text file.
This is the case where you should consider the Recipe Method.
A Recipe File is a text file that contains saved table and column-parsing
information. The recipe can later be applied to unmarked data files.
Creating a Recipe File
One simple way to create (or edit) a recipe is to use the Recipe Editor
from the main menu or a simple text editor such as Windows Notepad. Valid
recipe file names use the *.rcp file extension (e.g. MyRecipe.rcp).
Example
Recipe file to illustrate file format
FILE CONTENTS COMMENT
[Header] ;Header
Section ID
Product=TXL-B ;Do
not change
FileType=RECIPE ;Do
not change
FileFormat=1.1 ;Do
not change
[Table 1] ;Table
1 Section ID
ReadStartLine=INCOME STATEMENT ;Find row containing "INCOME STATEMENT"
ReadStartLineOffset=0 ;table
starts at the same row
ReadEndLine=BALANCE SHEET ;Find row
containing "Balance Sheet"
ReadEndLineOffset=-1 ;table
1 ends one row before end key
Parsing=------------------ ==================== ;Column Template
WriteColumn=A ;Start
column in Excel
[Table 2]
ReadStartLine= BALANCE SHEET
ReadStartLineOffset=0
ReadEndLine= END OF REPORT
ReadEndLineOffset=-1
Parsing=-------------- ===============
WriteColumn=A
Note:The Parsing column template
attribute is discussed in the File Marking
Method, so please review that if you haven't. Essentially this property
tells TXL Wizard how to parse the table data into columns.
The above Recipe file
will work correctly for the example text below:
Example Input
Text File (for the above recipe example):
INCOME STATEMENT
ACCOUNT First Second
Quarter
Quarter
Revenues:
Sales Products $1,000 $1,000,000
Sales Services $1,000 $1,000,000
Sales Misc $1,000 $1,000,000
Expenses:
Payroll $300 $300
Travel Expenses $300 $300
Other $1,000 $1,000
BALANCE SHEET
Assets:
Account 1st Q 2nd
Q
xxxxxx xx yyyyyy zzzzzz
xxxxx xxxx xxx yyyyyy zzzzzz
xxxxxxxxxx
END OF REPORT
Special Case: How to handle a table that has no ending tag (ReadEndLine)
If you have a table that has no ending tag, TXL Wizard can process it if:
1. The table has a starting tag (ReadStartLine)
AND
2. The table is at the end of the file (or is the only table in the file).
The trick is to use the same item used for the ReadStartLine as ReadEndLine. Also, specify a very big ReadEndLineOffset.
If for example we have a table that has no ReadEndLine and is at the end of the file (or is the only table in the file) that will never have more than 1000 rows the recipe file portion for the table would be:
[Table 1]
ReadStartLine= Schools
ReadStartLineOffset= +1
ReadEndLine= Schools
ReadEndLineOffset= +1000
Parsing=---------- ------- ------------------------- ============================
WriteColumn= A
The above example is nearly identical to the installed Example 3. Please give it a go and modify to your specific needs.
Backing Up Recipe Files
Because recipe files are simple text files, backing them up is as simple as making a copy of them. We would recommend putting all your recipe files in the same folder as you create them.
The default data folder for TXL Wizard is:
%appdata%\Softinterface, Inc\TXL Wizard\
While using the software you may have saved recipe files in this location. Otherwise, as you Save and Save As recipe files, make a note of where you are storing them for archival purposes.