Skip to main content

Workbook Engineer Agent

The Workbook Engineer is OpsHub’s spreadsheet automation specialist, transforming how investment operations teams create, validate, and maintain complex spreadsheets. Unlike generic spreadsheet tools, this agent understands investment operations formulas, ASIC RG94 compliance rules, and data synchronization patterns—delivering intelligent automation that feels like having an expert Excel programmer on your team.
The Workbook Engineer uses UniverJS for spreadsheet manipulation, OpenAI GPT-4 for formula generation, and direct database integration for real-time data synchronization.

Agent Overview

Primary Responsibilities

The Workbook Engineer specializes in:
  • Spreadsheet Creation & Maintenance - Building validation templates, templates, and operational workbooks from scratch
  • Formula Generation & Validation - Creating Excel formulas with AI-powered translation from natural language
  • Data Synchronization - Keeping spreadsheet data in sync with your Supabase database in real-time
  • Range Operations - Bulk cell updates, highlighting critical data, and intelligent row insertion
  • Template Development - ASIC RG94-compliant validation templates with built-in tolerance checking

Key Differentiators

UniverJS Integration

Native spreadsheet engine for reliable cell operations, formula execution, and formatting

AI Formula Translation

Convert natural language to Excel formulas, SQL queries, and Python code automatically

Database-Aware

Direct connection to all 14 Supabase schemas for intelligent data sourcing and validation

Compliance-First Design

ASIC RG94 templates built in, with automatic tolerance checking and breach detection

Tool Capabilities

The Workbook Engineer has access to 6 specialized spreadsheet tools:

1. Spreadsheet Set Cell

Purpose: Set individual cell values with intelligent type detection. When to use: Populating validation results, recording reconciliation outcomes, or updating reference data. Example Usage:
User: "Set cell A1 to the NAV variance value 0.0002"
Agent: Uses spreadsheet_set_cell to populate the calculated variance
Result: Cell A1 displays 0.0002 with automatic formatting
Parameters:
  • row (number) - Row index, 0-based
  • col (number) - Column index, 0-based
  • value (any) - String, number, boolean, or formula
  • sheetId (optional) - Target sheet, defaults to active sheet

2. Spreadsheet Get Cell

Purpose: Read cell values for analysis, calculation, or validation. When to use: Reading NAV data for comparison, retrieving baseline values, or validating inputs before processing. Example Usage:
User: "What's the NAV value in cell B5?"
Agent: Uses spreadsheet_get_cell to retrieve the value
Result: "Cell B5 contains 1.2345"
Parameters:
  • row (number) - Row index, 0-based
  • col (number) - Column index, 0-based
  • sheetId (optional) - Source sheet
Returns: Cell value with original format information

3. Spreadsheet Set Formula

Purpose: Insert Excel formulas that calculate automatically and update dynamically. When to use: Creating validation rules, building calculation templates, or establishing dynamic references. Supported Formulas:
  • =NAV_COMPARE(admin_nav, custodian_nav, tolerance) - NAV variance checking
  • =RECONCILE(admin_value, custodian_value, tolerance) - Reconciliation validation
  • =BREACH_CHECK(actual, expected, tolerance) - Tolerance breach detection
  • Standard Excel functions: SUM, SUMIF, ABS, IF, VLOOKUP, INDEX/MATCH, etc.
Example Usage:
User: "Create a NAV comparison formula in C10 with 3bp tolerance"
Agent: Uses spreadsheet_set_formula
Result: Formula =NAV_COMPARE(B10, D10, 0.0003) inserted and calculating
Parameters:
  • row (number) - Target row
  • col (number) - Target column
  • formula (string) - Excel formula starting with =
  • sheetId (optional) - Target sheet

4. Spreadsheet Select Range

Purpose: Highlight cell ranges to focus user attention on critical data areas. When to use: Drawing attention to validation breaches, highlighting problematic ranges, or marking areas for review. Example Usage:
User: "Highlight the cells with NAV variances"
Agent: Uses spreadsheet_select_range to highlight breach area
Result: Range A5:D8 highlighted in red with breach indicators
Parameters:
  • startRow (number) - Range start row
  • startCol (number) - Range start column
  • endRow (number) - Range end row
  • endCol (number) - Range end column

5. Spreadsheet Insert Row

Purpose: Add new rows for data entries, validation rules, or expanding templates. When to use: Adding new validation checks, accommodating additional fund data, or expanding templates. Example Usage:
User: "Add 3 new rows below row 10 for additional validation rules"
Agent: Uses spreadsheet_insert_row
Result: 3 blank rows inserted at position 10 with inherited formatting
Parameters:
  • position (number) - Where to insert (0-based row index)
  • count (optional, default: 1) - Number of rows to insert

6. Spreadsheet Analyze (Most Powerful)

Purpose: Automatically generate ASIC RG94-compliant validation rules from data patterns. When to use: Setting up new validation templates, analyzing data structure, or generating compliance rules. Validation Types & Default Tolerances:
TypeTolerancePurpose
NAV3 bpsNet Asset Value reconciliation
cash0 bpsCash balance (zero tolerance)
holdings1 bpPosition reconciliation
fees5 bpsFee calculation validation
reconciliation3 bpsTotal assets reconciliation
Example Usage:
User: "Analyze the NAV data in A1:D100 and generate validation rules"
Agent: Uses spreadsheet_analyze with validationType: 'NAV'
Result: Returns suggested rules with formulas, tolerances, and ASIC RG94 compliance mapping
Parameters:
  • range (string) - Data range to analyze (e.g., “A1:Z100”)
  • validationType (enum) - ‘NAV’ | ‘cash’ | ‘holdings’ | ‘fees’ | ‘reconciliation’
  • context (optional object):
    • fundType - e.g., “equity”, “balanced”, “fixed-income”
    • assetClass - e.g., “Australian equities”, “international bonds”
    • toleranceBps - Override default tolerance in basis points
Returns:
{
  "summary": "Generated 2 NAV validation rules with 3bp tolerance for equity fund",
  "hasIssues": false,
  "rules": [
    {
      "ruleCode": "NAV-001",
      "ruleName": "NAV Variance Check",
      "formula": "=NAV_COMPARE(Admin_NAV, Custodian_NAV, 0.0003)",
      "tolerance": 3,
      "severity": "error"
    }
  ],
  "references": [
    "https://asic.gov.au/regulatory-resources/.../rg-94-unit-pricing/"
  ]
}

Common Workflows

Workflow 1: Setting Up NAV Validation

Scenario: You need to validate NAV data from two sources with a 3bp tolerance. User Request:
“Set up NAV validation for Fund A comparing admin NAV against custodian data”
Agent Workflow:
  1. Analyze Data - Uses spreadsheet_analyze to understand data structure
  2. Generate Rules - Creates NAV_COMPARE formulas with 3bp tolerance
  3. Create Template - Inserts validation rules into spreadsheet
  4. Highlight Results - Marks cells where breaches occur
  5. Sync Database - Stores results to validation.validation_results table
Outcome: Complete NAV validation template ready to use, with real-time breach detection

Workflow 2: Cash Reconciliation Setup

Scenario: You need zero-tolerance cash reconciliation across multiple custodians. User Request:
“Create a cash reconciliation template with zero tolerance”
Agent Workflow:
  1. Insert Header Rows - Adds structure with spreadsheet_insert_row
  2. Set Reconciliation Formulas - Creates RECONCILE formulas for each cash position
  3. Apply Zero Tolerance - Configures breach detection with 0bps tolerance
  4. Add Controls - Includes balance-checking formulas
  5. Create Insights - Records template with compliance mapping
Outcome: Cash reconciliation template following ASIC RG94 zero-tolerance requirements

Workflow 3: Data Synchronization

Scenario: You want spreadsheet data to automatically sync with database tables. User Request:
“Sync the holdings data in columns B-D with the investment.holdings table”
Agent Workflow:
  1. Read Range - Uses spreadsheet_get_cell to sample data structure
  2. Create Sync Rules - Maps spreadsheet columns to database columns
  3. Generate Formulas - Creates formulas that pull live data from database
  4. Set Up Updates - Configures write-back to keep data synchronized
  5. Verify Sync - Tests bidirectional sync with sample data
Outcome: Live-updating spreadsheet pulling data from Supabase in real-time

Database Integration

The Workbook Engineer has direct access to all 14 Supabase schemas: Read Access (All Schemas):
  • investment.* - Portfolio holdings, securities, transactions
  • validation.* - Rules, validation results, tolerance matrices
  • performance.* - Returns, attribution, performance metrics
  • market_data.* - Pricing, FX rates, corporate actions
  • All other analytical schemas
Write Access (Controlled):
  • validation.validation_results - Store validation outcomes
  • agent.drafts - Propose spreadsheet changes for approval
  • audit.audit_log - Record spreadsheet changes for compliance
Example Query Integration:
User: "Show me the fund names and current NAV for all equity funds"
Agent: Automatically generates SQL from formula request
Database: Queries investment.organizations + investment.portfolios
Result: Spreadsheet populated with live fund data

Formulas & Validation

Custom Investment Functions

// NAV Variance Checking
=NAV_COMPARE(B2, C2, 0.0003)  // 3bp tolerance
Returns: TRUE if variance within tolerance, FALSE if breach

// Reconciliation Checking
=RECONCILE(B5, C5, 0)  // Zero tolerance for cash
Returns: TRUE if exact match, FALSE if discrepancy found

// Tolerance Breach Detection
=BREACH_CHECK(D10, E10, 0.0001)  // 1bp tolerance
Returns: Variance amount if breach, "" if within tolerance

Formula Translation

The agent can translate natural language to Excel formulas:
User: "Create a formula that sums holdings quantity for each security"
Agent: Generates =SUMIF($A:$A, A2, $D:$D)

User: "Check if NAV is within 3bp of expected value"
Agent: Generates =IF(ABS((B2-C2)/C2)<=0.0003, "PASS", "FAIL")

Use Cases

For Fund Accountants

NAV Validation Automation
“I used to manually compare NAV values in a spreadsheet. Now the Workbook Engineer creates the validation template with formulas, automatically flags breaches, and shows me exactly where to look.”
Time Savings: 2-3 hours → 15 minutes daily Error Reduction: 95% fewer manual calculation errors

For Compliance Officers

ASIC RG94 Template Management
“We need to validate that every fund meets ASIC requirements. The engineer automatically generates compliant templates with the right tolerances and creates audit evidence for each validation.”
Benefit: Complete audit trail with zero manual work

For Operations Teams

Multi-Fund Data Sync
“We manage 50+ funds across multiple custodians. The agent syncs all data to spreadsheets automatically, runs validations, and alerts us to issues before they become problems.”
Outcome: Real-time operational visibility across entire fund family

Integration with Other Agents

The Workbook Engineer collaborates with:
  • Dashboard Architect - Shares validation results and metrics
  • OpsHub Orchestrator - Receives task delegation and workspace context
  • Fund Accountant Assistant - Provides validated data for reconciliation
  • Compliance Sentinel - Generates audit evidence for RG94 compliance

Performance & Scalability

Cell Operation Limits

  • Single Operation: less than 100ms for typical cell operation
  • Batch Operations: Up to 1,000 cells per operation with formula caching
  • Large Dataset Analysis: Can analyze 100,000+ rows for pattern detection

Optimization Tips

  1. Use Formulas Instead of Values - Formulas auto-update when source data changes
  2. Batch Range Operations - Group multiple cell updates into single operations
  3. Leverage Spreadsheet_Analyze - One call provides intelligence for multiple operations
  4. Cache Database Queries - Formulas cache lookups to reduce database load

Configuration

Scope & Permissions

  • Read Access: All investment, validation, performance, market_data schemas
  • Write Access: Validation results, audit logs, drafts only
  • Default Workspace: Active workbook with scoped sheet access
  • User Context: Inherits team/organization isolation from session

System Integration

With UniverJS:
  • Native cell value types (string, number, boolean, formula)
  • Cell formatting and conditional formatting
  • Multi-sheet workbook support
  • Real-time formula recalculation
With Database:
  • Schema-aware query generation
  • Automatic type mapping (SQL → Excel)
  • Foreign key relationship detection
  • Real-time data subscriptions
With Audit System:
  • All cell changes logged to audit.audit_log
  • Formula changes tracked with timestamp
  • User attribution on all modifications
  • Rollback capability for compliance

Security & Compliance

Data Protection

  • Row-Level Security - Only accesses data user has permission to see
  • Team Isolation - Cannot access data from other teams
  • Audit Logging - Every spreadsheet change recorded for compliance
  • Draft System - Changes require user approval before execution

ASIC RG94 Compliance

  • Built-in Templates - Pre-configured with regulatory requirements
  • Tolerance Matrices - Asset-class specific tolerance enforcement
  • Breach Detection - Automatic flagging of non-compliant results
  • Evidence Capture - Complete audit trail for regulatory reviews

Getting Started

Step 1: Request Spreadsheet Automation

Open the Agent Console and ask:
“Create a NAV validation spreadsheet for Fund A”

Step 2: Agent Proposes Solution

The agent will:
  • Analyze your fund structure
  • Generate a validation template
  • Create draft with compliance mapping
  • Show you the proposed structure

Step 3: Review & Apply

  • Review the proposed template
  • Approve changes
  • Agent applies the template to your workbook

Step 4: Ongoing Use

  • Agent monitors data and flags issues
  • You focus on exception handling
  • Compliance evidence builds automatically

Troubleshooting

”Agent doesn’t recognize my formula”

Solution: Be more explicit with names. Instead of “Create a SUM formula,” say “Create a formula that sums column D rows 2 to 50."

"Spreadsheet changes aren’t syncing to database”

Solution: Ensure the spreadsheet has workbookId in workspace context. Check that your user role has write permissions to the target table.

”Formula is showing #ERROR!”

Solution: The agent will automatically investigate. You can ask “What’s wrong with the formula in C5?” and the agent will debug.

FAQ

Yes. The Workbook Engineer can navigate between sheets, create cross-sheet references, and manage entire workbook structures. Just specify the sheet name in your requests.
You can specify the exact formula and the agent will set it. Or describe what you want and the agent will translate it. If translation fails, you can edit directly.
The analysis can handle ranges up to 1M cells. Performance is optimized for typical business datasets (100K rows is comfortable). For larger datasets, we recommend breaking into multiple workbooks.
Currently the agent focuses on cell operations and formulas. For charts, use the Dashboard Architect agent instead.
Formulas preserve your edits. Manual values are tracked in the audit log. If you want the agent to recalculate, simply ask it to refresh the range.

Advanced Features

Custom Validation Rules

The agent can create custom validation rules beyond the standard tolerances:
User: "Create a rule that flags if any holding is >10% of portfolio value"
Agent: Generates formula =IF(D2/SUM(D:D)>0.1, "ALERT", "OK")

Conditional Formatting

The agent automatically applies formatting to highlight results:
  • Red background for breaches
  • Green background for passes
  • Yellow for warnings
  • Blue for information

Performance Optimization

The agent suggests index usage and query optimization:
User: "This formula is slow when checking 50,000 holdings"
Agent: Suggests using SUMPRODUCT instead of array formula for 10x speedup

Next Steps

  1. Explore Validation Templates - Ask the agent to show available ASIC RG94 templates
  2. Set Up Data Sync - Request synchronization between spreadsheet and database
  3. Create Custom Rules - Build validation rules specific to your fund structures
  4. Integrate with Workflows - Connect spreadsheet automation to approval workflows

Learn More:
  • Spreadsheet Integration Guide
  • Formula Translation Guide
  • Database Integration
  • ASIC RG94 Compliance

Last Updated: October 2025 Agent Version: 1.0.0 Status: Production Ready UniverJS Version: 0.10.9+