Back to KB
Difficulty
Intermediate
Read Time
8 min

📁 Bulk Import & Export Excel Data for Joget Form Grids

By Codcompass Team··8 min read

High-Performance Excel Integration Patterns for Joget Form Grids

Current Situation Analysis

Enterprise applications frequently encounter a critical friction point at the data entry layer: users prepare structured data in spreadsheets but are forced to transcribe it manually into web forms. This "Excel-to-UI" gap creates three distinct problems:

  1. Operational Latency: Manual entry of line items (e.g., procurement lists, inventory counts) scales linearly with volume. A 200-row grid can consume 15–20 minutes of operator time, increasing the risk of fatigue-induced errors.
  2. Data Integrity Risks: Transcription errors—swapped digits, misaligned columns, or omitted rows—are common when humans bridge the gap between a spreadsheet and a form grid.
  3. Architectural Misalignment: Many development teams attempt to solve this via server-side parsing. While functional, this approach introduces unnecessary network latency, increases server load for binary file processing, and raises data privacy concerns when sensitive financial or HR data traverses the backend.

The industry standard for resolving this is client-side processing using the SheetJS (XLSX) library. By parsing Excel files directly in the browser and injecting data into the Joget DOM, you eliminate server round-trips for parsing, ensure data never leaves the client environment, and provide an instantaneous user experience. However, naive implementations often freeze the UI thread or rely on brittle column indexing, leading to production failures.

WOW Moment: Key Findings

The following comparison highlights why a robust client-side integration outperforms traditional methods across critical enterprise metrics.

ApproachLatency (200 Rows)Server LoadData PrivacyImplementation Complexity
Manual Entry~15 minutesNoneHighLow
Server-Side Import2–4 secondsHigh (Parsing/IO)Medium (Data in transit)High (Backend logic)
Client-Side SheetJS<1 secondNoneHigh (Local only)Medium (Requires DOM manipulation)

Why this matters: Client-side integration shifts the computational burden to the user's device, which is idle during data entry. This results in near-instant population of grids while maintaining strict data sovereignty. The key to success lies in asynchronous injection and dynamic header mapping to prevent UI blocking and schema drift.

Core Solution

This solution implements a modular ExcelGridBridge that handles import, export, and grid management. Unlike basic implementations, this pattern includes dynamic header mapping to tolerate column reordering and batched async injection to maintain UI responsiveness.

Architecture Decisions

  1. Dynamic Header Mapping: Instead of assuming columns are in fixed positions (e.g., row[0] is always "Item"), the script parses the first row to build a map of header names to indices. This allows users to rearrange columns in Excel without breaking the import.
  2. Batched Async Injection: Injecting rows synchronously blocks the main thread. The solution processes rows in configurable batches with a setTimeout yield, allowing the browser to repaint and keeping the interface responsive.
  3. Clean Export: The export logic clones the rendered grid table, strips action columns (edit/delete buttons), and generates a pristine Excel file, ensuring the download contains only data.

Implementation

Prerequisites:

  • Include SheetJS in your Joget App via Userview Settings > Custom JavaScript or a script tag.
  • Target Grid ID: procurement_grid (Replace with your actual Grid ID).

HTML Container: Place this in a Custom HTML element above your Form Grid.

<div id="excel-toolkit" class="toolkit-panel">
  <div class="toolkit-actions">
    <inp

🎉 Mid-Year Sale — Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register — Start Free Trial

7-day free trial · Cancel anytime · 30-day money-back