XLSXLibExcel files for Ring

Getting started

Install the package and write the first spreadsheets.

Install#

Install the package with RingPM, the Ring package manager, in one step:

Shell
ringpm install xlsxlib from ringpackages

Quick start#

Simple Spreadsheet#

Ring
load "xlsxlib.ring"

excel = new ExcelWriter()
excel.addSheet("Data")
excel.setCell(1, 1, "Hello")
excel.setCell(1, 2, "World")
excel.setCell(2, 1, 42)
excel.save("output.xlsx")

Quick Export Function#

Ring
load "xlsxlib.ring"

data = [
    ["Name", "Age", "City"],
    ["Ahmed", 25, "Cairo"],
    ["Sara", 30, "Riyadh"]
]

quickExcel("output.xlsx", data, "People")

Using Styles#

Ring
load "xlsxlib.ring"

excel = new ExcelWriter()
excel.addSheet("Report")

# Create a header style
headerStyle = excel.createStyle([
    :bold = true,
    :bgColor = "4472C4",
    :fontColor = "FFFFFF",
    :align = "center"
])

# Apply style to cells
excel.setCellWithStyle(1, 1, "Product", headerStyle)
excel.setCellWithStyle(1, 2, "Price", headerStyle)

excel.setCell(2, 1, "Laptop")
excel.setCell(2, 2, 999.99)

excel.save("report.xlsx")
XLSXLib - Excel files for Ring, made with ringdoc.