MorphoGrid VBA Export · practical guide

Build visually. Run the same process inside Excel.

Use MorphoGrid on a representative file, save the recipe, then compile it into a self-contained .bas module. Import that module into Excel and apply the same sequence to a larger source file—without uploading the dataset or rebuilding the logic as formulas.

Source opens read-onlyRecipe-controlled headersLocal processing
THE BOTTLENECK

The sample works. The real file is enormous.

Browser previews are ideal for designing and checking a transformation. Very large workbooks can still be better handled by desktop Excel, especially when the business already exchanges XLSM or XLSB tools.

THE BRIDGE

A recipe becomes portable VBA.

MorphoGrid converts supported steps into explicit VBA procedures and gives the module one clear starting macro: StartMorphoGrid.

THE RESULT

Files in. Protected output sheet out.

The macro opens the source read-only, asks for the applicable worksheet, copies the table into the macro workbook and writes transformed records to a new output sheet.

What gets transferred

The logic moves. The source data does not.

A BAS file contains instructions—not the sample workbook. It carries supported recipe steps, expected headers, file-selection controls and output handling.

IN MORPHOGRIDRecipe
  • Remove five top rows
  • Promote the next row as headers
  • Trim customer names
  • Standardize header order
  • Filter invalid records
GENERATED MODULEMorphoGrid_Claims.bas
StartMorphoGrid
  Select source file
  Select worksheet
  Copy source read-only
  Run recipe procedures
  Format output + run log
IN EXCELOutput_CleanClaims
  • New output sheet
  • Frozen and filtered header
  • Original source untouched
  • Row count and status logged

Editable runtime inputs

Change filters and values without regenerating the BAS.

Generated modules create a MorphoGrid Parameters sheet with editable values, retained defaults, validation and reset controls.

Read parameter-table help →

Five-step walkthrough

From saved recipe to a larger processed dataset.

These screens show the complete Windows Excel workflow. You only need to use the VBA editor once per generated module.

01

Generate

Choose the saved recipe in VBA Export.

Open MorphoGrid’s VBA Export page, choose Recipe, and select the saved transformation. Review the compatibility list before downloading.

  1. Build and test with a representative file.
  2. Save the recipe with a meaningful name.
  3. Select it in VBA Export.
  4. Optionally enhance through local Ollama, then review and approve the complete code.
  5. Click Download .bas.
The BAS contains instructions, not sample records or AI credentials.
MorphoGrid VBA Export with a compatible recipe and Download BAS button
Compatibility is checked before download.
02

Import

Add the BAS to a macro-enabled workbook.

Create the workbook that will host the process. Save it as Excel Macro-Enabled Workbook (.xlsm) or Excel Binary Workbook (.xlsb).

  1. Press Alt + F11.
  2. Choose File → Import File….
  3. Select the downloaded MorphoGrid_….bas.
  4. Save with Ctrl + S and return to Excel.
Do not paste BAS contents into a worksheet. Import the file inside the VBA editor.
VBA editor File menu with Import File selected and a MorphoGrid BAS file
The module appears under Modules in the VBA project.
03

Start

Run one clearly named macro.

Back in Excel, press Alt + F8, choose StartMorphoGrid, and click Run. The module creates a MorphoGrid Control sheet with a large Select file and process button.

  1. Enable Content if Excel displays a security banner.
  2. Run StartMorphoGrid.
  3. Use the control-sheet button for later runs.
RunMorphoGridRecipe remains as a compatible alias.
Excel Macro dialog with StartMorphoGrid selected
The entry point stays the same regardless of recipe length.
04

Select

Choose the larger source file and worksheet.

The Windows dialog accepts XLSX, XLSM, XLSB, XLS, CSV, TSV and TXT. Workbooks with multiple visible worksheets receive a sheet selector.

  1. Select the large source file.
  2. Choose its worksheet when prompted.
  3. Review file, worksheet, available rows and columns.
  4. Confirm to begin processing.
Header promotion is workflow-controlled. If the real header starts on row 6, configure Remove top rows = 5 in the recipe.
Windows file picker selecting a large Excel file and a MorphoGrid preview
The source opens read-only and is copied before transformation.
05

Review

Inspect the output and run record.

Successful runs create a collision-safe Output_… sheet with bold headers, filters, frozen panes and fitted columns. A run log records source, sheet, output, row count and status.

  1. Check the completion message and written-row count.
  2. Review known records in the output sheet.
  3. Open MorphoGrid Run Log.
  4. Save the host workbook when accepted.
The source workbook closes without being saved.
MorphoGrid Control, output and run log sheets
Control, output and history stay together.

Compatibility

What can be compiled today.

MorphoGrid checks each step before enabling the BAS download. Unsupported operations are surfaced instead of silently approximated.

Directly compiled

Rename, drop, trim, case, replace, fill blanks, nested filters, deduplicate, sort, remove rows, number/date/text operations, join or split columns, mask, calculate, header standardization, aggregate, rank, duplicate and create column.

Guided file support

XLSX, XLSM, XLSB, XLS, CSV, TSV and TXT. Worksheet selection applies to Excel workbooks. Text delimiters follow desktop Excel’s opening behavior.

Review required

Pivot construction, nested JSON/XML reconstruction and some multi-file joins are not silently converted. The compatibility panel identifies them.

Local AI is optional

Ollama can revise the complete module for a specific request. The deterministic version remains active until the revision is previewed and approved.

For larger datasets

Design small. Verify. Then scale carefully.

VBA avoids the browser’s memory ceiling, but Excel is not unlimited. Worksheet row limits, free memory, and 32-bit versus 64-bit Office still matter.

  1. PrototypeUse an extract with the same headers and value patterns.
  2. ValidateCompare row counts, totals and known records.
  3. CompileDownload only after every required step is supported.
  4. Dry runProcess a medium copy before production.
  5. ScalePrefer 64-bit Excel for genuinely large workbooks.

Questions before the first run

VBA Export FAQ

Does the BAS contain my sample data?

No. It contains transformation procedures and the guided file workflow, not source records.

Will it overwrite the selected file?

No. Recipe modules open the source read-only, copy the table into the macro host and close the source without saving.

How do I promote a header on row 6?

Add Remove top rows with a value of 5. Original row 6 becomes the new header; the macro does not ask separately.

Why must the host be XLSM or XLSB?

XLSX cannot retain VBA modules. XLSM and XLSB can store and execute imported BAS code.

Can a colleague run it?

Yes, if their organization permits macros. They do not need MorphoGrid to run an already imported module.

Is generated VBA automatically safe?

Test macros on copies and follow your security policy. AI-enhanced modules deserve additional inspection.

A visual recipe for the sample. A repeatable module for the real file.

Build once, then take the process into Excel.

Keep the readable MorphoGrid workflow and portable BAS together as the process evolves.