Formatting
Complete guide to formatting spreadsheets - fonts, colors, borders, alignment, and data formats
Master spreadsheet formatting with the BoxLang Fluent API. This guide covers all visual styling options to create professional-looking spreadsheets.
📋 Format Options Reference
Complete Format Structure
formatOptions = {
// Font properties
bold: true,
italic: false,
underline: false,
strikeout: false,
font: "Arial",
fontsize: 11,
fontColor: "black",
// Background color
fgcolor: "white",
bgcolor: "white", // Alias for fgcolor
// Alignment
alignment: "left", // left, center, right, justify
verticalalignment: "top", // top, center, bottom
// Data format
dataformat: "General", // Excel format code
// Borders
leftborder: "thin", // none, thin, medium, thick
rightborder: "thin",
topborder: "thin",
bottomborder: "thin",
leftbordercolor: "black",
rightbordercolor: "black",
topbordercolor: "black",
bottombordercolor: "black",
// Text control
wraptext: false,
locked: false,
hidden: false
};🔤 Font Formatting
Font Styles
Font Family and Size
Font Colors
Supported Color Names:
black,white,red,green,blueyellow,cyan,magentaorange,pink,purplegray,grey,darkgray,lightgraydarkblue,lightbluedarkgreen,lightgreendarkred,brownOr use hex codes:
##RRGGBB
🎨 Background Colors
Cell Backgrounds
Alternating Row Colors
📐 Alignment
Horizontal Alignment
Vertical Alignment
Text Wrapping
🔢 Data Formats
Number Formats
Currency Formats
Date and Time Formats
Common Date Format Codes:
m- Month (1-12)mm- Month (01-12)mmm- Month (Jan-Dec)mmmm- Month (January-December)d- Day (1-31)dd- Day (01-31)ddd- Day (Mon-Sun)dddd- Day (Monday-Sunday)yy- Year (24)yyyy- Year (2024)h- Hour (0-23)hh- Hour (00-23)mm- Minute (00-59)ss- Second (00-59)
Custom Formats
🔲 Borders
Simple Borders
Border Styles
Border Styles:
none- No borderthin- Thin linemedium- Medium linethick- Thick linedashed- Dashed linedotted- Dotted linedouble- Double line
Border Colors
Table Borders
🎯 Formatting Scopes
Single Cell Formatting
Row Formatting
Column Formatting
Range Formatting
💡 Formatting Patterns
Professional Headers
Financial Reports
Status Indicators
Conditional Formatting (Manual)
📚 Next Steps
FormulasAdvanced FeaturesExamplesLast updated
Was this helpful?
