Blog

Announcing bx-spreadsheet : Excel Made Elegant

Luis Majano October 30, 2025

Spread the word

Luis Majano

October 30, 2025

Spread the word


Share your thoughts

We're thrilled to announce the release of the BoxLang Spreadsheet Module (bx-spreadsheet), a comprehensive solution for creating, reading, and manipulating Excel spreadsheets with style and simplicity. Whether you're building data export features, generating reports, or migrating from legacy CFML applications, this module delivers the power you need with the modern BoxLang elegance you expect.

✨ Three APIs, One Powerful Module

The BoxLang Spreadsheet Module offers three distinct APIs to suit your coding style and migration needs:

Experience the modern, chainable interface that makes spreadsheet operations intuitive and readable:

Spreadsheet( "sales-report.xlsx" )
    .createAndSelectSheet( "Q1 Sales" )
    .setRowData( 1, [ "Product", "Revenue", "Profit" ] )
    .addRow( [ "Widget A", 50000, 20000 ] )
    .addRow( [ "Widget B", 45000, 18000 ] )
    .setCellFormula( 2, 3, "B2-20000" )
    .formatRow( 1, { bold: true, fgcolor: "blue", fontColor: "white" } )
    .autoSizeColumns()
    .save();

📚 Built-in Functions

Perfect for migrating from Adobe ColdFusion or Lucee with drop-in compatibility:

sheet = SpreadsheetNew( "Report" );
SpreadsheetSetCellValue( sheet, "Hello", 1, 1 );
SpreadsheetAddRow( sheet, [ "Data", "Here" ] );
SpreadsheetWrite( sheet, "file.xlsx", true );

🏷️ Spreadsheet Component

Support for legacy tag-based code migration or a declarative approach in either templating or script:

<bx:spreadsheet action="create" name="sheet" />
<bx:spreadsheet action="setCellValue" name="#sheet#" row="1" column="1" value="Hello" />
<bx:spreadsheet action="write" name="#sheet#" filename="file.xlsx" />

Scripting

bx:spreadsheet action="create" name="sheet";
bx:spreadsheet action="setCellValue" name="#sheet#" row="1" column="1" value="Hello";
bx:spreadsheet action="write" name="#sheet#" filename="file.xlsx";

🚀 Features That Shine

The BoxLang Spreadsheet Module is packed with professional-grade capabilities:

  • ✨ Fluent Method Chaining - Write readable, maintainable code
  • 📊 Multiple Formats - Support for both .xls and .xlsx formats
  • 🎨 Rich Formatting - Fonts, colors, borders, alignments, and custom styles
  • 🔢 Formula Support - Set, evaluate, and recalculate Excel formulas
  • 📈 Data Import/Export - Convert to/from JSON, CSV, Query, and Array formats
  • 🖼️ Image Embedding - Add images with precise positioning
  • 🔐 Password Protection - Secure your spreadsheets
  • 📄 Multi-Sheet Support - Create and manage multiple worksheets
  • 🚀 High Performance - Built on Apache POI for reliable processing
  • 🔧 Comprehensive API - 85+ BIF functions and full component support
  • 🤖 Automatic Resource Management - No manual cleanup required
  • 🚀 Large File Streaming - Memory-efficient processing with Consumer callbacks

💡 Real-World Examples

Database Export Made Simple

// Query your database
employees = queryExecute(
    "SELECT name, department, salary FROM employees ORDER BY name"
);

// Export to beautifully formatted Excel
Spreadsheet( "employee-export.xlsx" )
    .addRows( data: employees, includeColumnNames: true )
    .formatRow( 1, { 
        bold: true, 
        fgcolor: "darkblue", 
        fontColor: "white",
        alignment: "center"
    } )
    .formatColumns( "3", { dataformat: "$#,##0.00" } )
    .autoSizeColumns()
    .save();

Financial Reports with Formulas

Spreadsheet( "quarterly-report.xlsx" )
    .setRowData( 1, [ "Quarter", "Revenue", "Expenses", "Profit" ] )
    .addRow( [ "Q1", 250000, 180000 ] )
    .addRow( [ "Q2", 275000, 190000 ] )
    .addRow( [ "Q3", 260000, 185000 ] )
    // Calculate profit with formulas
    .setCellFormula( 2, 4, "B2-C2" )
    .setCellFormula( 3, 4, "B3-C3" )
    .setCellFormula( 4, 4, "B4-C4" )
    // Add totals row
    .setRowData( 5, [ "TOTAL", "=SUM(B2:B4)", "=SUM(C2:C4)", "=SUM(D2:D4)" ] )
    .formatRow( 1, { bold: true, fgcolor: "blue", fontColor: "white" } )
    .formatRow( 5, { bold: true, fgcolor: "lightgray" } )
    .formatColumns( "2-4", { dataformat: "$#,##0", alignment: "right" } )
    .autoSizeColumns()
    .save();

Multi-Sheet Workbooks

Spreadsheet( "company-data.xlsx" )
    // Summary sheet
    .createAndSelectSheet( "Summary" )
    .setRowData( 1, [ "2024 Annual Report" ] )
    .mergeCells( 1, 1, 1, 5 )
    .formatCell( 1, 1, { bold: true, fontsize: 18, alignment: "center" } )
    
    // Sales data sheet
    .createAndSelectSheet( "Sales" )
    .setRowData( 1, [ "Month", "Units", "Revenue" ] )
    .addRow( [ "January", 150, 75000 ] )
    .addRow( [ "February", 180, 90000 ] )
    .formatRow( 1, { bold: true } )
    
    // Expenses sheet
    .createAndSelectSheet( "Expenses" )
    .setRowData( 1, [ "Category", "Amount" ] )
    .addRow( [ "Marketing", 25000 ] )
    .addRow( [ "Operations", 45000 ] )
    .formatRow( 1, { bold: true } )
    
    .save();

🎓 Seamless CFML Migration

Migrating from Adobe ColdFusion or Lucee? We've got you covered with full BIF compatibility:

// Your existing CFML code works immediately
sheet = SpreadsheetNew( "Report" );
SpreadsheetAddRow( sheet, "Name,Age,Email" );
SpreadsheetAddRow( sheet, "John,30,john@example.com" );
SpreadsheetWrite( sheet, "output.xlsx", true );

// Then gradually modernize to the Fluent API
Spreadsheet( "output.xlsx" )
    .addRow( [ "Name", "Age", "Email" ] )
    .addRow( [ "John", 30, "john@example.com" ] )
    .save();

📖 Comprehensive Documentation

The module includes extensive documentation with (https://boxlang.ortusbooks.com/boxlang-framework/boxlang-plus/modules/bx-spreadsheet)

  • Quick Start Guide - Get productive in 5 minutes
  • Complete User Guide - In-depth tutorials and patterns
  • Formatting Guide - Master cell styling and layouts
  • Formula Guide - Work with Excel calculations
  • API Reference - Detailed documentation for all three APIs
  • Real-World Examples - Production-ready code samples
  • Full JavaDocs - Complete API documentation at apidocs.ortussolutions.com

🤖 MCP Server Integration

Connect directly to our documentation MCP server for instant access to all module information:

https://boxlang.ortusbooks.com/~gitbook/mcp

🎯 Try It Now - 60 Day Free Trial

The BoxLang Spreadsheet Module is available to BoxLang+ and BoxLang++ subscribers, but everyone can try it with our 60-day free trial. Simply install the module and start building:

box install bx-spreadsheet@ortus

The trial allows you to explore all features and capabilities without any limitations. Experience the power of modern spreadsheet manipulation with BoxLang!

💼 Subscription Benefits

While the module includes a generous 60-day trial, a BoxLang+ or BoxLang++ subscription unlocks:

  • Unlimited Usage - No trial restrictions
  • Production Deployment - Use in commercial applications
  • Priority Support - Direct access to our engineering team
  • Regular Updates - New features and enhancements
  • Additional Modules - Access to our growing library of BoxLang+ modules

Explore BoxLang+ Plans →

🎁 Get Access

bx-spreadsheet is available exclusively to BoxLang +/++ subscribers. Join our subscription program to access this and other premium modules that extend BoxLang's capabilities:

  • Priority Support - Get help when you need it
  • Premium Modules - Access subscriber-only modules
  • Early Access - Be first to try new features
  • Exclusive Benefits - CFCasts account, FORGEBOX Pro, and more

🛒 Purchase Options

Ready to unlock bx-ldap and other premium modules? Choose your plan:

🌟 View BoxLang Plans & Pricing

Need help choosing the right plan or have questions? Contact us directly:

📧 info@boxlang.io

Add Your Comment

Recent Entries

12 Days of BoxLang - Day 4: TestBox

12 Days of BoxLang - Day 4: TestBox

Today we’re celebrating one of the most exciting new additions to the BoxLang ecosystem:

the TestBox BoxLang CLI Runner — a fast, native way to run your TestBox tests directly through the BoxLang Runtime. ⚡

No server required. No CommandBox needed. Just pure, ultra-fast BoxLang-powered testing from the command lineon Windows, Mac, and Linux.

If you’re building modern applications with BoxLang — web apps, CLIs, serverless functions, Android apps, or OS-level utilities — this new feature gives you a unified, flexible testing workflow you can run anywhere.

Victor Campos
Victor Campos
December 13, 2025
12 days of BoxLang - Day 3: SocketBox!

12 days of BoxLang - Day 3: SocketBox!

As BoxLang continues evolving into a modern, high-performance, JVM-based runtime, real-time communication becomes essential for the applications we all want to build: dashboards, collaboration tools, notifications, live feeds, multiplayer features, and more.

That’s where SocketBox steps in — the WebSocket upgrade listener built to work seamlessly with CommandBox and the BoxLang MiniServer. ⚡

Today, for Day 3, we’re highlighting how SocketBox supercharges BoxLang development by giving you fast, flexible, and framework-agnostic WebSocket capabilities.

Maria Jose Herrera
Maria Jose Herrera
December 12, 2025
12 Days of BoxLang - Day 2: CommandBox

12 Days of BoxLang - Day 2: CommandBox

BoxLang + CommandBox: The Enterprise Engine Behind Your Deployments

For Day 2 of our 12 Days of Christmas series, we’re diving into one of the most powerful parts of the BoxLang ecosystem: CommandBox the defacto enterprise servlet deployment platform for BoxLang.

If BoxLang is the language powering your applications, CommandBox is the engine room behind it all. ⚙️

Victor Campos
Victor Campos
December 11, 2025