Template Filler Tool

User Manual & Job Aid  |  Version 1.0  |  March 2026

Contents

  1. What is the Template Filler Tool?
  2. Typical Workflow — Quick Start
  3. The Run Sheet — Buttons & Email Settings
  4. Template Filler Form — Section by Section
  5. Column Mapping Types (COL, STATIC, SKIP, COUNT, LOOKUP, COND, SUM)
  6. The Norm (Normalize) Checkbox
  7. Filter / Group Section
  8. Saved Configs — Saving and Loading Mappings
  9. The Presets Sheet
  10. Batch Run — Running Multiple Configs at Once
  11. The Log Sheet
  12. Send Email
  13. Log Archive
  14. Best Practices
  15. Common Mistakes & Troubleshooting

1   What is the Template Filler Tool?

The Template Filler Tool (TFT) is an Excel macro workbook that automates the process of filling Oracle ERP upload templates from a Master Raw Data file.

Without TFT, a user would open the raw export, copy columns into the template manually, apply transformations (remove dashes, add fixed values, decide CREATE vs UPDATE row by row), save the file with a dated name, and repeat for every template variant. This takes hours and introduces copy-paste errors.

With TFT, you configure the mapping once, save it, and from then on the whole process runs in a single click — including file naming, filtering, and email dispatch.

Who is this for? Anyone who receives a Master Raw Data file and must produce one or more Oracle upload files from it on a recurring basis.

2   Typical Workflow — Quick Start

First time with a new template — takes about 5–10 minutes to set up. Every run after that takes seconds.

1 Open the TFT workbook. Go to the Run sheet.

2 Click Template Filler. The mapping form opens.

3 Select your template — either a sheet in this workbook, or browse to an external file. Click Scan Template.

4 Select your source file — the Master Raw Data file. Set the header row and data start row. Click Scan Source.

5 Map each template column — for every column in your template, choose a Type and a Source/Value. See Section 5 for all types explained.

6 Set your output folder and file name pattern. Set any filters if needed.

7 Click Save Config — give it a name. Your mapping is saved and can be reloaded next time.

8 Click Run. The output file is created, named, and saved to your folder.

9 Next time: open the form, Load Config, browse to the source file, Scan Source, Run. Done.


3   The Run Sheet — Buttons & Email Settings

The Run sheet is the home screen of TFT. It contains four buttons and the email configuration area.

Button What it does
Template Filler Opens the main mapping form (frmTFTMapper). Use this to create, edit, and run a single config.
Run Batch Opens the Batch Run form. Select multiple saved configs and run them all in one click with one source file.
Send Email Opens the file picker. Select output files to attach, preview the email, and send to Outlook Drafts for review.
Log Archive Exports all Log rows to an Excel archive file, then clears the Log sheet. Asks for confirmation before clearing.

Email Settings (cells B16–B19 on the Run sheet)

Fill these in once. They are used every time you click Send Email.

CellFieldNotes
B16To:Comma-separated recipient email addresses. Required — the email will not open if this is blank.
B17CC:Optional. Comma-separated CC addresses.
B18SubjectSupports the {DATE} token. Example: Output Files Ready — {DATE}
B19BodySupports {DATE}, {FILES} (list of attached filenames), and {FOLDER} (output folder path). Use Alt+Enter for line breaks.

4   Template Filler Form — Section by Section

The main form is divided into four sections: Template, Data Source, Output, and Column Mapping.

4.1 Template Section

Choose where your template lives:

Header row — the row in the template that contains column names. Usually row 1. Use the arrow (◄ ►) buttons to change it. After changing, click Scan Template to refresh the column list.

Scan Template — reads the template headers and populates the Template Column column in the mapping grid. Always click this before mapping for the first time, or after changing the header row.

4.2 Config Load / Save Bar

The dropdown lists all saved configs. Select one and click Load Config to restore all settings (template, mapping, output folder, filter, etc.) from a previous session.

After making changes, click Save Config. If the config name already exists it is overwritten. To create a new one, type a new name in the box first.

Tip: Name configs after the template and variant, e.g. ITM_UPD_1234 or STATUS_UPDATE_A_B_C. Avoid spaces — use underscores.

4.3 Data Source Section

Source file — browse to your Master Raw Data file (.xlsx or .xls). The path is stored in the config but the file is never modified.

Hdr row — the row containing column headers in the source file. Usually 1.

Dat row — the first row of actual data. Usually header row + 1 = 2.

Scan Source — reads the source file headers and makes them available in the Source/Value dropdowns in the mapping grid. You must click this before the dropdowns will show your source columns.

Important: The source file path is NOT saved in the config. Each run you must browse to (or re-select) the source file and click Scan Source. This is by design — the source file changes every week/month.

4.4 Output Section

SettingWhat it does
FolderThe folder where output files are saved. Use Browse… to pick it.
Excel 97-2003 (.xls)Saves as the legacy .xls format. Required for most Oracle upload tools.
Tab-delimited (.txt)Saves as a plain text file with tabs between columns. Use when the system requires a text upload.
File name patternThe output filename template. Supports tokens (see below).

File Name Tokens

TokenReplaced withExample result
{DATE}Today's date in DDMMMYYYY format18MAR2026
{TMPL}The template sheet/file name (spaces replaced by underscores)TEMP_ITM_UPD_CATG
{GROUP}The current group value (when "One file per group value" is selected)1234

Example pattern: {DATE}_DK_{TMPL}_{GROUP}_ABCD → produces 18MAR2026_DK_TEMP_ITM_UPD_CATG_1234_ABCD.xls

Auto-versioning: If an output file with the same name already exists in the folder, TFT automatically appends _V1, _V2, etc. rather than overwriting. You will never lose a previous run's output.

4.5 Column Mapping Grid

The heart of the tool. Each row in the grid represents one column in the template. For each column you choose:


5   Column Mapping Types

Every template column must be assigned a Type. The Type tells TFT where the value comes from.

Type Plain English Source / Value field Lookup Set field Common use
COL Copy a value from the source file, row by row Pick the source column name Leave blank Item number, description, category name — any column that varies per row
STATIC Write the same fixed value into every row Type or pick the value (presets available) Leave blank Organization code (always 100), Process ID (always 4455), set name
SKIP Leave this template column blank Template has columns your upload doesn't need
COUNT Auto-number each row: 1, 2, 3… Line number or sequence column required by the system
LOOKUP Look up the source value in a table and write the mapped result Pick the source column to look up Pick the lookup table name (from Lookup_Sets sheet) Map a buyer ID to a buyer name; map a code to a description
COND Conditional: if source column is blank → write value A; if filled → write value B Pick the source column to check Type blank_result|notblank_result e.g. CREATE|UPDATE TRANSACTION_TYPE: no old category → CREATE; old category present → UPDATE
SUM Sum all values in a source column and write the total once Pick the source column to sum Leave blank Total quantity or value lines at the bottom of an upload

5.1 COL — Detailed Notes

Use COL whenever the value comes from your raw data and differs from row to row. The Source/Value dropdown shows all column headers found in the source file after Scan Source.

Pair with Norm (Section 6) when the source data may contain dirty values (dashes as placeholders, leading spaces, invisible characters).

5.2 STATIC — Detailed Notes

Use STATIC for any value that is always the same regardless of the data row. The Source/Value dropdown shows presets — common values stored in the Presets sheet (see Section 9). You can also type a value directly.

When you save a config with a STATIC value that is not yet in the Presets sheet, TFT automatically adds it so it is available next time.

5.3 COND — Detailed Notes

COND checks whether the source column cell is blank for each row and writes one of two values accordingly.

Blank detection is smart: a cell containing only dashes (-), equals signs (=), spaces, or other non-alphanumeric characters is treated as blank. This prevents false UPDATE results when the source file uses - as a "no value" placeholder.

Lookup Set format: type the two values separated by a pipe character with no spaces: CREATE|UPDATE The value before the pipe is used when the source cell is blank; the value after the pipe is used when the source cell has content.

Column read order does not matter for COND. COND reads from the source file (loaded into memory before the run), not from the template being written. So even if TRANSACTION_TYPE (col E) is filled before OLD_CATEGORY_NAME (col G), the check is always correct.

5.4 LOOKUP — Detailed Notes

Lookup tables live on the Lookup_Sets sheet. Each named range is a two-column table: column A = the key to match, column B = the value to write.

The Lookup Set dropdown in the mapping form lists all named tables on the Lookup_Sets sheet. If a key is not found in the table, the cell is left blank.


6   The Norm (Normalize) Checkbox

The Norm checkbox appears at the end of each mapping row. When ticked, TFT cleans the resolved value before writing it to the template.

What Norm does

  1. Removes leading and trailing whitespace and invisible control characters.
  2. If the result contains no letters or digits at all (only dashes, equals, at-signs, pipes, etc.) → the cell is cleared. These are data-entry errors or placeholder values in the source.
  3. If the result contains at least one letter or digit → it is kept exactly as cleaned.

What Norm preserves

Source valueAfter NormWhy
Item 123 Item 123Leading/trailing spaces stripped; content kept
C-SPARESC-SPARESHas letters — kept exactly
Active NFSActive NFSHas letters — kept exactly
4M54M5Has alphanumeric — kept exactly
-(blank)No alphanumeric content — cleared
---(blank)No alphanumeric content — cleared
@(blank)No alphanumeric content — cleared

When to use Norm

Use Norm on COL columns when your source data comes from an Oracle export or manual entry and may contain dirty values — dashes as placeholders, extra spaces, or invisible characters copied from another system.
Do NOT use Norm on ITEM_NUMBER or any column where the value is a controlled code that you do not expect to be dirty. Norm on a clean column does no harm, but it is unnecessary and could obscure issues if the source changes unexpectedly.

Norm has no effect on STATIC, COUNT, COND, or LOOKUP types — those values are controlled by the mapping, not the source data. The Norm checkbox is automatically greyed out for those types.


7   Filter / Group Section

Use this section to control which source rows appear in the output and whether to split the output into separate files.

7.1 Group by Column

Select a source column from the dropdown. This is the column whose values determine which rows belong together. Leave as (none) to include all rows in one file.

Click Load Values to populate the value list below with the unique values found in that column. Then select which values to include or exclude.

7.2 Filter Modes

ModeWhat it doesWhen to use
Include selected Only rows where the Group column matches one of your ticked values You want specific groups only (e.g. only org codes 100 and 200)
Exclude selected All rows EXCEPT those matching your ticked values You want everything except a few known bad groups
Not blank All rows where the Group column has any non-empty value Best for recurring runs — automatically includes any new values added to the source in future
Best practice: Use Not blank wherever possible. It is future-proof — if a new category or org code appears in next month's data export, it will automatically be included without you having to re-open the form and tick it.

7.3 Output Modes

ModeWhat it does
One file per group value Creates a separate output file for each unique value in the Group column. Use {GROUP} in the file name pattern to include the value in the filename.
One combined file All matching rows go into a single output file.

8   Saved Configs — Saving and Loading Mappings

A config stores everything you set in the form: template selection, header row, column mapping (type, source, lookup set, norm for every column), output folder, file format, file name pattern, filter mode, and group column.

Configs are stored on the Saved_Configs sheet. You can view them there but should not edit them manually.

The source file path is intentionally NOT saved. Each run you browse to the current month's source file. This prevents the config from accidentally pointing to last month's data.

Loading a config

  1. Open the Template Filler form.
  2. Select the config name from the dropdown at the top of the form.
  3. Click Load Config.
  4. The template and all mapping settings are restored. A green confirmation message appears.
  5. Browse to your source file and click Scan Source.
  6. Click Run.

9   The Presets Sheet

The Presets sheet is a reference table of common STATIC values. Column A = Template_Column (the template column name, e.g. ORGANIZATION_CODE). Column B = Preset_Value (the value to fill, e.g. 100).

When you select STATIC type for a column in the mapping form, the Source/Value dropdown is pre-populated with all Preset_Value entries that match the template column name. This saves typing and prevents typos.

Auto-append: When you save a config with a STATIC value that is not already in the Presets sheet, TFT adds it automatically. Over time the Presets sheet builds up a complete library of known values.

You can manually add rows to the Presets sheet at any time. Just type the Template_Column name in column A and the value in column B. No formatting needed.

10   Batch Run — Running Multiple Configs at Once

The Batch Run form lets you run several saved configs sequentially with one source file and one click. This is ideal when you produce multiple template variants from the same Master Raw Data file.

How to use Batch Run

  1. Click Run Batch on the Run sheet.
  2. Tick the configs you want to run in the list.
  3. Click Browse… next to Master Source Data File and select your source file.
  4. Optionally, browse to an Output Folder to override the folder stored in each config. Leave blank to use each config's own saved folder.
  5. Click Run Selected.

Each config runs in sequence. Progress is shown in the status bar. Results are logged to the Log sheet when complete.

The output folder override is applied at run time only — it does not change the folder stored in the saved config. Next time you load the config in the mapper form, the original folder is still there.

11   The Log Sheet

Every run is recorded on the Log sheet. The log is cumulative — rows are never removed automatically (use Log Archive to clear it periodically).

ColumnContents
A — TimestampDate and time of the event
B — EventINFO (starting a config), SAVED (file written), DONE (config complete), ERROR (something failed)
C — DetailFile path (clickable hyperlink for SAVED rows), or a descriptive message
D — RowsNumber of data rows written to the output file
E — Open FolderClickable hyperlink to the output folder in Windows Explorer
F — HintAdditional context (e.g. config name, filter applied)
Click any hyperlink in column C or E to open the file or folder directly from the Log without having to navigate in Windows Explorer.

12   Send Email

The Send Email button opens a file picker that shows all output files recorded in the Log. The email is composed in Outlook and opened for your review — it is never sent automatically.

The file picker

Email preview

The bottom of the picker shows a preview of the To:, Subject:, and file list that will appear in the email. If the To: field (cell B16 on the Run sheet) is blank, a warning is shown — you can still open the email and fill in the address manually in Outlook.

After clicking Send Email

Outlook opens with the email ready to review. You can edit the recipients, subject, body, or add additional attachments before clicking Send in Outlook.


13   Log Archive

When the Log sheet grows large, use Log Archive to export it and clear it.

  1. Click Log Archive on the Run sheet.
  2. Browse to the folder where you want to save the archive file.
  3. A confirmation dialog appears: "This will archive X log rows and clear the Log sheet. Are you sure?"No is the default. Click Yes to proceed.
  4. The archive is saved as an .xlsx file with a dated name. The Log sheet is cleared.
Once the Log is cleared it cannot be restored from the workbook. The archive file is your only copy. Make sure you have browsed to a safe folder before confirming.

14   Best Practices

  1. Always Scan Source before running. Even if you loaded a config, the source columns are not in memory until you scan. Without scanning, the run will fail or produce empty columns.
  2. Save your config before running for the first time. If the run fails you can reload the config and adjust without re-mapping everything.
  3. Use Norm on COL columns from Oracle exports. Oracle exports frequently contain dashes, extra spaces, or invisible characters in "empty" cells. Norm clears these automatically without affecting real values.
  4. Do not use Norm on code columns (item numbers, IDs). These are controlled values. If they are dirty in the source, that is a source data problem that should be fixed upstream, not silently modified by TFT.
  5. Prefer "Not blank" filter over "Include selected". Selecting individual values means you must re-open the config every time a new org code or category appears in the data. "Not blank" handles new values automatically.
  6. Use Batch Run for recurring multi-template jobs. Set up all your configs once, then every run is: open Batch Run → browse to source → Run Selected. Avoids opening the mapper form at all.
  7. Keep the Presets sheet tidy. Remove outdated values (old process IDs, retired org codes). The Presets sheet is shared across all configs — stale values clutter every STATIC dropdown.
  8. Use the {GROUP} token in the file name pattern when running "One file per group value". Without it, all files would have the same name and only the last one (or versioned copies) would survive.
  9. Archive the Log monthly. A large Log slows down the Send Email file picker (it scans every SAVED row). Archive at the end of each month cycle.
  10. Fill in B16–B19 on the Run sheet once and leave them. The email settings are permanent — you only need to update them if recipients change. The body tokens ({DATE}, {FILES}) are replaced fresh on every send.

15   Common Mistakes & Troubleshooting

Symptom Likely cause Fix
Template columns don't appear in the mapping grid Scan Template was not clicked after selecting the template Click Scan Template
Source column dropdowns are empty Scan Source was not clicked after selecting the source file Browse to the source file and click Scan Source
Output file has 0 rows Filter is too restrictive — no rows matched the selected values Check the Filter/Group section. Try "Not blank" or clear the filter
TRANSACTION_TYPE shows UPDATE for all rows including new items COND source column check column may be wrong, or the source uses spaces/dashes as "no value" Confirm the correct check column is selected. Norm handles dashes automatically — no extra action needed if Norm is ticked.
ITEM_NUMBER has dashes stripped from it Norm is ticked on ITEM_NUMBER Untick Norm for ITEM_NUMBER. Norm should only be used where dirty data is expected.
Email picker is empty (no files listed) No SAVED rows in the Log — no runs have been completed yet Run a config first, or use Add File… to manually add files to attach
Send Email shows no To: address in the preview Cell B16 on the Run sheet is blank Fill in B16. You can also add/edit the address in Outlook after the draft opens.
Batch Run uses the wrong output folder Each config has its own saved folder; the override is empty Browse to the desired folder in the Output Folder (overrides saved config) field in the Batch Run form
File already exists — old version was overwritten This cannot happen — TFT auto-versions files Check for _V1, _V2 suffixed files in the output folder
Log Archive confirmation appeared but I clicked No — nothing happened No is the default on the confirmation dialog (intentional) Click Log Archive again and click Yes this time

Template Filler Tool  |  Internal Use  |  March 2026  |  To report issues or request enhancements, contact the macro maintainer. ytcodes.dev