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

BoxLang 1.17 Series Part 3 : Encrypted Config Secrets

BoxLang 1.17 Series Part 3 : Encrypted Config Secrets

Everyone knows the datasource password should not be sitting in plain text in a config file. Everyone has also, at some point, shipped exactly that, because the alternative was a pile of environment variable plumbing that nobody wanted to build on a deadline. x

Luis Majano
Luis Majano
September 08, 2026
BoxLang AI 3.4 Blog Series Part 3 : Batched Approvals

BoxLang AI 3.4 Blog Series Part 3 : Batched Approvals

Here's a bug that's easy to miss until it bites someone in production: an agent turn asks for two tool calls at once, both need human approval, and only the first one actually suspends. The second one gets silently skipped. Not rejected, not queued, just gone. That's what happened before 3.4.0, and it's fixed now with batched tool-call approvals.

Luis Majano
Luis Majano
September 08, 2026
Getting Started with BoxLang as an Alternative CFML Engine

Getting Started with BoxLang as an Alternative CFML Engine

If you have an existing ColdFusion or Lucee application, one of the first questions you may have about BoxLang is probably not:

β€œShould I rewrite my application in BoxLang?”

It is much simpler:

β€œCan BoxLang run the CFML application I already have?”

That was the focus of veteran CFML troubleshooter Charlie Arehart’s session at Into the Box 2026, Getting Started with BoxLang as an Alternative CFML Engine.

Cristobal Escobar
Cristobal Escobar
September 08, 2026