For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Export

Export spreadsheet data to CSV, JSON, HTML, and query formats

Learn how to export spreadsheet data to various formats using the BoxLang Fluent API. Convert Excel files to CSV, JSON, HTML, queries, and more.


πŸ“„ Export to CSV

Basic CSV Export

// Load and export to CSV
csv = Spreadsheet( "employees.xlsx" ).toCSV();

// Save to file
fileWrite( "employees.csv", csv );

CSV with Custom Delimiter

sheet = Spreadsheet( "data.xlsx" );

// Export with semicolon delimiter
csv = sheet.toCSV( delimiter = ";" );

// Export with tab delimiter
csv = sheet.toCSV( delimiter = chr(9) );

fileWrite( "data.csv", csv );

CSV from Specific Sheet

CSV with Headers


πŸ”€ Export to JSON

Array of Objects

Pretty-Printed JSON

JSON with Custom Structure


πŸ—„οΈ Export to Query

Basic Query Conversion

Query with Custom Column Names

Query from Specific Range


🌐 Export to HTML

Simple HTML Table

HTML with Custom Styling


πŸ“¦ Export to Array

Array of Arrays

Array of Structs

Array with Specific Columns


πŸ”„ Batch Export

Export All Sheets to CSV

Export Multiple Formats


🎯 Export Patterns

Pattern: Filtered Export

Pattern: Transformed Export

Pattern: Export with Metadata

Pattern: Chunked Export


πŸ“Š Export for APIs

REST API Response

GraphQL Response Format


πŸ“¦ Export to Binary

Get Spreadsheet as Binary

Stream Binary Download


πŸ”„ Import and Export Pipeline

CSV to Excel

Excel to Database

Database to Excel Export


πŸ“š Next Steps

Advanced FeaturesExamplesFluent API

Last updated

Was this helpful?