///|
test "create workbook" {
// Empty workbook
let wb = @xlsx.Workbook::new()
inspect(wb.sheets().length(), content="0")
// Add a sheet
ignore(wb.add_sheet("Data"))
debug_inspect(wb.get_sheet_list(), content="[\"Data\"]")
}///|
test "cell operations" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Test")
// Set cell by reference
sheet.set_cell("A1", "Hello")
sheet.set_cell("B1", "World")
// Set cell by row/column (1-indexed)
sheet.set_cell_rc(2, 1, "Row 2, Col 1")
// Read cells
debug_inspect(sheet.get_cell("A1"), content="Some(\"Hello\")")
debug_inspect(sheet.get_cell_rc(2, 1), content="Some(\"Row 2, Col 1\")")
// Set typed values
sheet.set_cell_value("C1", Numeric(42.5))
sheet.set_cell_value("D1", Bool(true))
debug_inspect(sheet.get_cell_value_raw("C1"), content="Some(Numeric(42.5))")
}///|
test "row and column operations" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Grid")
// Set entire row (1-indexed)
sheet.set_row(1, ["A", "B", "C", "D"])
// Set entire column (1-indexed)
sheet.set_col(1, ["1", "2", "3"])
// Read row/column
debug_inspect(sheet.get_row(1), content="[\"1\", \"B\", \"C\", \"D\"]")
debug_inspect(sheet.get_col(1), content="[\"1\", \"2\", \"3\"]")
// Row/column dimensions
inspect(sheet.max_row(), content="3")
inspect(sheet.max_col(), content="4")
}///|
test "formulas" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Calc")
sheet.set_cell("A1", "10")
sheet.set_cell("A2", "20")
sheet.set_cell("A3", "30")
// Formula with cached value
sheet.set_cell_formula("A4", "SUM(A1:A3)", value="60")
debug_inspect(sheet.get_cell_formula("A4"), content="Some(\"SUM(A1:A3)\")")
// Calculate formula
inspect(wb.calc_cell_value("Calc", "A4"), content="60")
// Array formula
let opts = @xlsx.FormulaOpts::array("B1:B3")
sheet.set_cell_formula_opts("B1", "{A1:A3*2}", opts~, value="20")
}///|
test "creating styles" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Styled")
// Create style with font
let bold_style = @xlsx.Style::font(
@xlsx.Font::with_values(bold=true, size=14.0),
)
let bold_id = wb.add_style(bold_style)
// Create style with fill
let yellow_fill = @xlsx.Style::fill(@xlsx.Fill::solid("FFFF00"))
let fill_id = wb.add_style(yellow_fill)
// Combine multiple style elements
let combined = @xlsx.Style::new()
.with_font(@xlsx.Font::with_values(bold=true, color="FF0000"))
.with_fill(@xlsx.Fill::solid("E0E0E0"))
.with_alignment(
@xlsx.Alignment::with_values(horizontal="center", wrap_text=true),
)
let combined_id = wb.add_style(combined)
// Apply style to cell
sheet.set_cell("A1", "Bold Text")
sheet.set_cell_style("A1", bold_id)
sheet.set_cell("A2", "Filled")
sheet.set_cell_style("A2", fill_id)
sheet.set_cell("A3", "Combined")
sheet.set_cell_style("A3", combined_id)
}///|
test "font options" {
let font = @xlsx.Font::with_values(
bold=true,
italic=true,
size=12.0,
color="0000FF", // Blue
underline="single",
strike=true,
)
debug_inspect(font.bold, content="Some(true)")
debug_inspect(font.size, content="Some(12)")
}///|
test "fill options" {
// Solid fill
let solid = @xlsx.Fill::solid("FF0000") // Red
debug_inspect(solid.typ, content="Some(\"pattern\")")
// Pattern fill
ignore(@xlsx.Fill::pattern(pattern=17, color="00FF00"))
// Gradient fill
ignore(@xlsx.Fill::gradient("FF0000", "0000FF", shading=1))
}///|
test "border options" {
// Create borders for all sides
let borders = [
@xlsx.Border::with_values("left", color="000000", style=1),
@xlsx.Border::with_values("right", color="000000", style=1),
@xlsx.Border::with_values("top", color="000000", style=1),
@xlsx.Border::with_values("bottom", color="000000", style=2), // Thicker bottom
]
let style = @xlsx.Style::border(borders)
debug_inspect(style.border.map(fn(b) { b.length() }), content="Some(4)")
}///|
test "number formats" {
// Built-in number format (index 2 = "0.00")
ignore(@xlsx.Style::builtin_number_format(2))
// Custom number format
ignore(@xlsx.Style::number_format("$#,##0.00"))
// Percentage
ignore(@xlsx.Style::builtin_number_format(10)) // "0.00%"
}///|
test "data validation" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Validation")
// Dropdown list validation
sheet.add_data_validation_list("A1:A10", ["Option 1", "Option 2", "Option 3"])
// Range validation with DataValidation struct
let dv = @xlsx.DataValidation::new(true) // allow_blank=true
dv.set_sqref("B1:B10")
dv.set_range(IntValue(1), IntValue(100), Whole, Between)
dv.set_error(Stop, "Invalid", "Enter 1-100")
dv.set_input("Hint", "Enter a number between 1 and 100")
sheet.add_data_validation(dv)
}///|
test "conditional formatting" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("CF")
// Create a style for conditional formatting
let red_fill = @xlsx.Style::fill(@xlsx.Fill::solid("FF0000"))
let cf_style_id = wb.new_conditional_style(red_fill)
// Cell value condition
let cf = @xlsx.ConditionalFormatOptions::new("cell")
cf.set_criteria(">")
cf.set_value("100")
cf.set_format(Some(cf_style_id))
sheet.set_conditional_format("A1:A100", [cf])
}///|
test "charts" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("ChartData")
// Add data
sheet.set_row(1, ["Category", "Value"])
sheet.set_row(2, ["A", "10"])
sheet.set_row(3, ["B", "20"])
sheet.set_row(4, ["C", "30"])
// Create chart series
let series = @xlsx.ChartSeries::new(
"ChartData!$B$2:$B$4", // values
"ChartData!$A$2:$A$4", // categories
name="Sales",
)
// Create chart options
let chart = @xlsx.ChartOptions::new(Bar)
chart.series.push(series)
chart.title = "Sales by Category"
chart.dimension = @xlsx.ChartDimension::with_values(480, 300)
// Add chart to sheet
sheet.add_chart_with_options("E1", chart)
}///|
test "tables" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("TableSheet")
// Add data for table
sheet.set_row(1, ["Name", "Age", "City"])
sheet.set_row(2, ["Alice", "30", "NYC"])
sheet.set_row(3, ["Bob", "25", "LA"])
// Add table with range reference and column headers
let table = sheet.add_table(
"A1:C3", // range reference
"Table1", // table name
["Name", "Age", "City"], // column headers
display_name="People",
style_name="TableStyleMedium2",
show_row_stripes=true,
)
inspect(table.name, content="Table1")
}///|
test "merged cells" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Merge")
// Set value first
sheet.set_cell("A1", "Merged Header")
// Merge cells
sheet.merge_cells("A1:D1")
// Get merged ranges
debug_inspect(sheet.merged_cells().to_owned(), content="[\"A1:D1\"]")
// Unmerge
sheet.unmerge_cells("A1:D1")
debug_inspect(sheet.merged_cells().to_owned(), content="[]")
}///|
test "hyperlinks" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Links")
// External hyperlink
sheet.set_cell("A1", "Visit Example")
sheet.set_cell_hyperlink(
"A1",
"https://example.com",
External,
display="Example Site",
tooltip="Click to visit",
)
// Internal link to another cell
sheet.set_cell("A2", "Go to Data")
sheet.set_cell_hyperlink("A2", "Sheet2!A1", Location)
// Enumerate full typed records, optionally filtered by hyperlink kind.
inspect(sheet.get_hyperlinks().length(), content="2")
inspect(sheet.get_hyperlinks(link_type=External).length(), content="1")
}///|
test "sheet operations" {
let wb = @xlsx.Workbook::new()
ignore(wb.add_sheet("Sheet1"))
ignore(wb.add_sheet("Sheet2"))
ignore(wb.add_sheet("Sheet3"))
// Get sheet by name
guard wb.sheet("Sheet1") is Some(sheet1) else { return }
sheet1.set_cell("A1", "OK")
// Rename sheet
wb.set_sheet_name("Sheet1", "Data")
debug_inspect(
wb.get_sheet_list(),
content="[\"Data\", \"Sheet2\", \"Sheet3\"]",
)
// Hide sheet
wb.set_sheet_visible("Sheet3", false)
inspect(wb.get_sheet_visible("Sheet3"), content="false")
// Delete sheet
wb.delete_sheet("Sheet2")
debug_inspect(wb.get_sheet_list(), content="[\"Data\", \"Sheet3\"]")
// Set active sheet
wb.set_active_sheet(1)
inspect(wb.active_sheet_index(), content="1")
}///|
test "row column dimensions" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Dims")
// Set row height
sheet.set_row_height(1, 30.0)
debug_inspect(sheet.get_row_height(1), content="Some(30)")
// Set column width
sheet.set_col_width(1, 20.0)
debug_inspect(sheet.get_col_width(1), content="Some(20)")
// Hide row
sheet.set_row_visible(2, false)
inspect(sheet.row_visible(2), content="false")
// Hide column
sheet.set_col_visible(3, false)
inspect(sheet.col_visible(3), content="false")
}///|
test "sheet protection" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Protected")
// Protect sheet with options
let opts = @xlsx.SheetProtectionOptions::with_values(
password="secret",
format_cells=false, // Prevent formatting
insert_rows=false, // Prevent inserting rows
delete_rows=false, // Prevent deleting rows
)
sheet.protect_sheet(opts)
// Check protection
debug_inspect(
sheet.sheet_protection().map(fn(p) { p.sheet }),
content="Some(true)",
)
// Unprotect
sheet.unprotect_sheet(password="secret")
}///|
test "page layout" {
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Print")
// Set page margins
let margins = @xlsx.PageLayoutMarginsOptions::with_values(
top=1.0,
bottom=1.0,
left=0.75,
right=0.75,
header=0.5,
footer=0.5,
)
sheet.set_page_margins(Some(margins))
// Set page layout
let layout = @xlsx.PageLayoutOptions::with_values(
orientation="landscape",
size=9, // A4
fit_to_width=1,
fit_to_height=0, // Auto
)
sheet.set_page_layout(Some(layout))
// Set header/footer
let hf = @xlsx.HeaderFooterOptions::with_values(
odd_header="&C&\"Arial,Bold\"Report Title",
odd_footer="&LPage &P of &N&R&D",
)
sheet.set_header_footer(Some(hf))
}///|
test "stream writer" {
let wb = @xlsx.Workbook::new()
ignore(wb.add_sheet("BigData"))
// Create stream writer
let sw = wb.new_stream_writer("BigData")
// Set column widths (must be before writing rows)
sw.set_col_width(1, 3, 15.0)
// Write rows in order
sw.set_row("A1", ["Header1", "Header2", "Header3"])
sw.set_row("A2", ["Data1", "Data2", "Data3"])
sw.set_row("A3", ["More", "Data", "Here"])
// Merge cells
sw.merge_cell("D1", "F1")
// Must flush when done
sw.flush()
}///|
test "read workbook" {
// Create and write a workbook
let wb = @xlsx.Workbook::new()
let sheet = wb.add_sheet("Test")
sheet.set_cell("A1", "Hello")
sheet.set_cell("A2", "World")
let bytes = @xlsx.write(wb)
// Read it back
let loaded = @xlsx.read(bytes)
debug_inspect(loaded.get_sheet_list(), content="[\"Test\"]")
debug_inspect(loaded.get_cell("Test", "A1"), content="Some(\"Hello\")")
debug_inspect(loaded.get_cell("Test", "A2"), content="Some(\"World\")")
}///|
let workbook = @mbtexcel.open_file("with_images.xlsx")
///|
let pictures = workbook.get_pictures("Sheet1", "A1")///|
test "typed date and duration cells" {
let wb = @xlsx.Workbook::new()
ignore(wb.add_sheet("Sheet1"))
// A date is stored as a whole-number serial (2024-07-03 -> 45476).
wb.set_cell_time("Sheet1", "A1", @time.date_time(2024, 7, 3))
debug_inspect(
wb.get_cell("Sheet1", "A1"),
content=(
#|Some("45476")
),
)
// A duration is stored as a fraction of a day (90 minutes -> 0.0625).
wb.set_cell_duration("Sheet1", "A2", @time.Duration::of(minutes=90))
debug_inspect(
wb.get_cell("Sheet1", "A2"),
content=(
#|Some("0.0625")
),
)
}///|
test "validate package" {
let wb = @xlsx.Workbook::new()
ignore(wb.add_sheet("Sheet1"))
wb.set_cell("Sheet1", "A1", "hello")
debug_inspect(@xlsx.validate_ooxml_package(@xlsx.write(wb)), content="[]")
}///|
test "error handling" {
let wb = @xlsx.Workbook::new()
// Try to get non-existent sheet
let result : Result[Int, Error] = Ok(wb.get_sheet_index("Missing")) catch {
e => Err(e)
}
debug_inspect(result, content="Ok(-1)")
// Invalid cell reference
let sheet = wb.add_sheet("Test")
let bad_ref : Result[Unit, Error] = Ok(sheet.set_cell("123", "value")) catch {
e => Err(e)
}
guard bad_ref is Err(_) else { return }
}///|
test "cell reference utilities" {
// Split cell name
debug_inspect(@xlsx.split_cell_name("AB123"), content="(\"AB\", 123)")
// Join cell name
inspect(@xlsx.join_cell_name("AB", 123), content="AB123")
// Coordinates (1-indexed)
debug_inspect(@xlsx.cell_name_to_coordinates("C5"), content="(3, 5)")
inspect(@xlsx.coordinates_to_cell_name(3, 5), content="C5")
// Absolute references
inspect(@xlsx.coordinates_to_cell_name(3, 5, abs=true), content="$C$5")
// Column conversion
inspect(@xlsx.column_name_to_number("AA"), content="27")
inspect(@xlsx.column_number_to_name(27), content="AA")
}///|
test "color utilities" {
// RGB to HSL
let (h, _, _) = @xlsx.rgb_to_hsl(255, 0, 0) // Red
inspect(h < 1.0, content="true") // Hue near 0
// HSL to RGB
let (r, _, _) = @xlsx.hsl_to_rgb(0.0, 1.0, 0.5) // Red
inspect(r, content="b'\\xFF'") // 255
// Theme color with tint
let tinted = @xlsx.theme_color("FF0000", 0.5)
inspect(tinted.length(), content="8")
}///|
test "defined names" {
let wb = @xlsx.Workbook::new()
ignore(wb.add_sheet("Data"))
// Create defined name
let dn = @xlsx.DefinedName::new(
"SalesRange",
"Data!$A$1:$D$100",
scope="Data",
)
wb.set_defined_name(dn)
// Get defined names
let names = wb.get_defined_names()
inspect(names.length(), content="1")
inspect(names[0].name, content="SalesRange")
}///|
test "document properties" {
let wb = @xlsx.Workbook::new()
// Set core properties
let props = @xlsx.CoreProperties::with_values(
title="Sales Report",
creator="Finance Team",
subject="Q4 2024 Sales",
keywords="sales, quarterly, report",
description="Quarterly sales report for Q4 2024",
)
wb.set_core_properties(props)
// Read back
let p = wb.core_properties()
inspect(p.title, content="Sales Report")
}| Category | Methods |
|---|---|
| Sheets | add_sheet, delete_sheet, copy_sheet, sheet, sheets, get_sheet_list, set_sheet_name, set_sheet_visible |
| Cells | get_cell, set_cell, get_cell_formula, set_cell_formula, calc_cell_value |
| Rows/Cols | get_row, set_row, get_col, set_col, insert_rows, remove_row, insert_cols, remove_col |
| Styles | add_style, new_style, get_style, new_conditional_style |
| Features | add_chart, add_table, add_data_validation, add_pivot_table, add_sparkline, add_image |
| Protection | protect_workbook, unprotect_workbook, protect_sheet, unprotect_sheet |
| Properties | core_properties, app_properties, custom_properties, set_defined_name |
| I/O | save, save_as, write_to_buffer |
| Category | Methods |
|---|---|
| Cells | get_cell, set_cell, get_cell_rc, set_cell_rc, set_cell_value, set_cell_formula, set_cell_style |
| Rows/Cols | get_row, set_row, get_col, set_col, set_row_height, set_col_width, set_row_visible, set_col_visible |
| Merge | merge_cells, unmerge_cells, merged_cells |
| Features | add_chart, add_table, add_data_validation, add_comment, add_hyperlink, add_image |
| Layout | set_page_margins, set_page_layout, set_header_footer, set_panes |
| Navigation | max_row, max_col, rows, cols, cells |
pub suberror XlsxError {
MissingPart(path~ : String)
SheetNotFound(name~ : String)
InvalidSheetName(msg~ : String)
SheetAlreadyExists(name~ : String)
InvalidSheetIndex(index~ : Int)
InvalidSheetOperation(msg~ : String)
InvalidXml(msg~ : String)
InvalidBase64(msg~ : String)
InvalidCellRef(value~ : String)
InvalidSharedString(index~ : Int)
InvalidStyleId(index~ : Int)
InvalidTable(msg~ : String)
InvalidSparkline(msg~ : String)
InvalidPivotTable(msg~ : String)
InvalidVBAProject(msg~ : String)
InvalidVmlDrawing(msg~ : String)
InvalidAutoFilter(msg~ : String)
InvalidDataValidation(msg~ : String)
InvalidConditionalFormat(msg~ : String)
InvalidDefinedName(msg~ : String)
DefinedNameDuplicate(name~ : String)
DefinedNameScope(name~ : String)
InvalidPageLayout(msg~ : String)
InvalidHeaderFooter(msg~ : String)
InvalidSheetProtection(msg~ : String)
InvalidWorkbookProperty(msg~ : String)
InvalidWorkbookProtection(msg~ : String)
InvalidOptions(msg~ : String)
InvalidExcelDate(value~ : Double)
InvalidSheetBackground(msg~ : String)
InvalidHyperlink(msg~ : String)
HyperlinkLimitExceeded(limit~ : Int)
CellTextTooLong(len~ : Int)
GraphicNameTooLong(len~ : Int, limit~ : Int)
GraphicAltTextTooLong(len~ : Int, limit~ : Int)
InvalidComment(msg~ : String)
CommentAlreadyExists(cell~ : String)
CommentNotFound(cell~ : String)
TableNotFound(name~ : String)
StreamModeConflict(msg~ : String)
StreamRowOrder(last~ : Int, next~ : Int)
StreamWriterClosed
EncryptedPackage
InvalidEncryptionInfo(msg~ : String)
InvalidEncryptedPackage(msg~ : String)
InvalidPassword
InvalidPasswordLength(len~ : Int)
UnsupportedEncryption(msg~ : String)
UnsupportedFeature(msg~ : String)
InvalidPackage(msg~ : String)
UnboundedArchive
ReadCancelled
ResourceLimitExceeded(kind~ : String, limit~ : Int, actual~ : Int)
} derive(Debug)pub struct AppProperties {
application : String
doc_security : Int?
scale_crop : Bool?
company : String
links_up_to_date : Bool?
hyperlinks_changed : Bool?
app_version : String
}fn AppProperties::with_values(application? : String, doc_security? : Int, scale_crop? : Bool, company? : String, links_up_to_date? : Bool, hyperlinks_changed? : Bool, app_version? : String) -> AppProperties#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn AutoFilter::to_repr(AutoFilter) -> Reprpub struct AutoFilterColumn {
col : Int
filters : Array[String]?
custom_filters : AutoFilterCustomFilters?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn AutoFilterColumn::to_repr(AutoFilterColumn) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn AutoFilterCustomFilter::to_repr(AutoFilterCustomFilter) -> Reprpub struct AutoFilterCustomFilters {
and_filter : Bool
filters : Array[AutoFilterCustomFilter]
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn AutoFilterCustomFilters::to_repr(AutoFilterCustomFilters) -> Repr#alias(AutoFilterOptions)
pub(all) struct AutoFilterOption {
column : String
expression : String
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn AutoFilterOption::to_repr(AutoFilterOption) -> Reprlet thin_black = Border::with_values("left", color="000000", style=1)
let thick_red = Border::with_values("bottom", color="FF0000", style=5)pub struct CalcPropsOptions {
calc_id : UInt?
calc_mode : String?
full_calc_on_load : Bool?
ref_mode : String?
iterate : Bool?
iterate_count : UInt?
iterate_delta : Double?
full_precision : Bool?
calc_completed : Bool?
calc_on_save : Bool?
concurrent_calc : Bool?
concurrent_manual_count : UInt?
force_full_calc : Bool?
} derive(Eq, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CalcPropsOptions::equal(CalcPropsOptions, CalcPropsOptions) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CalcPropsOptions::not_equal(x : CalcPropsOptions, y : CalcPropsOptions) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CalcPropsOptions::to_repr(CalcPropsOptions) -> Reprfn CalcPropsOptions::with_values(calc_id? : UInt, calc_mode? : String, full_calc_on_load? : Bool, ref_mode? : String, iterate? : Bool, iterate_count? : UInt, iterate_delta? : Double, full_precision? : Bool, calc_completed? : Bool, calc_on_save? : Bool, concurrent_calc? : Bool, concurrent_manual_count? : UInt, force_full_calc? : Bool) -> CalcPropsOptionspub struct Cell {
reference : String
row : Int
col : Int
value : String
value_type : CellValueType
rich_text : Array[RichTextRun]?
formula : String?
formula_type : FormulaType?
formula_ref : String?
formula_shared_index : UInt?
formula_value_present : Bool
style_explicit : Bool
style_id : Int
}pub struct CellFormulaInfo {
formula : String
formula_type : FormulaType?
range_ref : String?
shared_index : UInt?
cached_value_present : Bool
}type CellImage#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CellValueType::equal(CellValueType, CellValueType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CellValueType::not_equal(x : CellValueType, y : CellValueType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CellValueType::to_repr(CellValueType) -> Reprpub struct Chart {
reference : String
xml : String
offset_x : Int
offset_y : Int
width_emu : Int
height_emu : Int
print_object : Bool
locked : Bool
positioning : PicturePositioning
// private fields
}pub(all) struct ChartAxis {
none : Bool
drop_lines : Bool
high_low_lines : Bool
major_grid_lines : Bool
minor_grid_lines : Bool
major_unit : Double
tick_label_position : ChartTickLabelPositionType
tick_label_skip : Int
reverse_order : Bool
secondary : Bool
maximum : Double?
minimum : Double?
alignment : Alignment
font : Font
log_base : Double
num_fmt : ChartNumFmt
title : String
title_rich : Array[RichTextRun]?
ax_id : Int
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartComboOptions::to_repr(ChartComboOptions) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDashType::equal(ChartDashType, ChartDashType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDashType::not_equal(x : ChartDashType, y : ChartDashType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDashType::to_repr(ChartDashType) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDataLabel::to_repr(ChartDataLabel) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDataLabelPositionType::equal(ChartDataLabelPositionType, ChartDataLabelPositionType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDataLabelPositionType::not_equal(x : ChartDataLabelPositionType, y : ChartDataLabelPositionType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDataLabelPositionType::to_repr(ChartDataLabelPositionType) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDataPoint::to_repr(ChartDataPoint) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartDimension::to_repr(ChartDimension) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartLegend::to_repr(ChartLegend) -> Reprpub(all) struct ChartLine {
typ : ChartLineType
dash : ChartDashType
color : String
transparency : Int
smooth : Bool
width : Double
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartLineType::equal(ChartLineType, ChartLineType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartLineType::not_equal(x : ChartLineType, y : ChartLineType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartLineType::to_repr(ChartLineType) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartMarker::to_repr(ChartMarker) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartNumFmt::to_repr(ChartNumFmt) -> Reprpub(all) struct ChartOptions {
typ : ChartType
series : Array[ChartSeries]
combo_charts : Array[ChartComboOptions]
format : GraphicOptions
dimension : ChartDimension
legend : ChartLegend
title : String
title_rich : Array[RichTextRun]?
fill_color : String
fill_transparency : Int
fill : ChartFill?
border : ChartLine
vary_colors : Bool
x_axis : ChartAxis
y_axis : ChartAxis
plot_area : ChartPlotArea
show_blanks_as : String
gap_width : Int?
overlap : Int?
hole_size : Int?
bubble_scale : Int?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartOptions::to_repr(ChartOptions) -> Reprpub(all) struct ChartPlotArea {
show_val : Bool
show_cat_name : Bool
show_ser_name : Bool
show_percent : Bool
show_leader_lines : Bool
show_bubble_size : Bool
show_data_table : Bool
show_data_table_keys : Bool
second_plot_values : Int
num_fmt : ChartNumFmt
up_bars : ChartUpDownBar
down_bars : ChartUpDownBar
fill_color : String
fill_transparency : Int
fill : ChartFill?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartPlotArea::to_repr(ChartPlotArea) -> Reprpub(all) struct ChartSeries {
name : String
categories : String
values : String
bubble_size : String?
sizes : String
fill_color : String
fill_transparency : Int
fill : ChartFill?
legend : ChartLegend
line : ChartLine
marker : ChartMarker
data_label : ChartDataLabel
data_label_position : ChartDataLabelPositionType
data_point : Array[ChartDataPoint]
} derive(Debug)fn ChartSeries::new(categories : String, values : String, name? : String) -> ChartSeries raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartSeries::to_repr(ChartSeries) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartTickLabelPositionType::to_repr(ChartTickLabelPositionType) -> Reprpub(all) enum ChartType {
Area
AreaStacked
AreaPercentStacked
Area3D
Area3DStacked
Area3DPercentStacked
Bar
BarStacked
BarPercentStacked
Bar3DClustered
Bar3DStacked
Bar3DPercentStacked
Bar3DConeClustered
Bar3DConeStacked
Bar3DConePercentStacked
Bar3DPyramidClustered
Bar3DPyramidStacked
Bar3DPyramidPercentStacked
Bar3DCylinderClustered
Bar3DCylinderStacked
Bar3DCylinderPercentStacked
Col
ColStacked
ColPercentStacked
Col3D
Col3DClustered
Col3DStacked
Col3DPercentStacked
Col3DCone
Col3DConeClustered
Col3DConeStacked
Col3DConePercentStacked
Col3DPyramid
Col3DPyramidClustered
Col3DPyramidStacked
Col3DPyramidPercentStacked
Col3DCylinder
Col3DCylinderClustered
Col3DCylinderStacked
Col3DCylinderPercentStacked
Doughnut
Line
Line3D
Pie
Pie3D
PieOfPie
BarOfPie
Radar
Scatter
Surface3D
WireframeSurface3D
Contour
WireframeContour
Bubble
Bubble3D
StockHighLowClose
StockOpenHighLowClose
} derive(Eq, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ChartUpDownBar::to_repr(ChartUpDownBar) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ColDimension::equal(ColDimension, ColDimension) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ColDimension::not_equal(x : ColDimension, y : ColDimension) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ColDimension::to_repr(ColDimension) -> Reprpub(all) struct Comment {
cell : String
author : String
author_id : Int?
text : String
paragraph : Array[RichTextRun]
width : Int?
height : Int?
} derive(Debug)pub(all) struct ConditionalFormatOptions {
format_type : String
above_average : Bool
percent : Bool
format : Int?
criteria : String
value : String
min_type : String
mid_type : String
max_type : String
min_value : String
mid_value : String
max_value : String
min_color : String
mid_color : String
max_color : String
bar_color : String
bar_border_color : String
bar_direction : String
bar_only : Bool
bar_solid : Bool
icon_style : String
reverse_icons : Bool
icons_only : Bool
stop_if_true : Bool
} derive(Debug)fn ConditionalFormatOptions::set_above_average(self : ConditionalFormatOptions, value : Bool) -> Unitfn ConditionalFormatOptions::set_bar_border_color(self : ConditionalFormatOptions, value : String) -> Unitfn ConditionalFormatOptions::set_bar_direction(self : ConditionalFormatOptions, value : String) -> Unitfn ConditionalFormatOptions::set_icon_style(self : ConditionalFormatOptions, value : String) -> Unitfn ConditionalFormatOptions::set_reverse_icons(self : ConditionalFormatOptions, value : Bool) -> Unitfn ConditionalFormatOptions::set_stop_if_true(self : ConditionalFormatOptions, value : Bool) -> Unit#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn ConditionalFormatOptions::to_repr(ConditionalFormatOptions) -> Reprpub struct CoreProperties {
title : String
subject : String
creator : String
keywords : String
description : String
last_modified_by : String
language : String
identifier : String
revision : String
content_status : String
category : String
version : String
created : String
modified : String
}fn CoreProperties::with_values(title? : String, subject? : String, creator? : String, keywords? : String, description? : String, last_modified_by? : String, language? : String, identifier? : String, revision? : String, content_status? : String, category? : String, version? : String, created? : String, modified? : String) -> CoreProperties#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CustomProperty::to_repr(CustomProperty) -> Reprpub(all) enum CustomPropertyValue {
Integer(Int)
Float(Double)
Boolean(Bool)
Text(String)
DateTime(String)
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn CustomPropertyValue::to_repr(CustomPropertyValue) -> Reprpub struct DataValidation {
allow_blank : Bool
error : String?
error_style : String?
error_title : String?
operator : String
prompt : String?
prompt_title : String?
show_drop_down : Bool
show_error_message : Bool
show_input_message : Bool
sqref : String
validation_type : String
formula1 : String
formula2 : String
} derive(Debug)fn DataValidation::set_drop_list(self : DataValidation, values : ArrayView[String]) -> Unit raise XlsxErrorfn DataValidation::set_error(self : DataValidation, style : DataValidationErrorStyle, title : String, msg : String) -> Unitfn DataValidation::set_range(self : DataValidation, formula1 : DataValidationFormula, formula2 : DataValidationFormula, validation_type : DataValidationType, op : DataValidationOperator) -> Unit raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DataValidation::to_repr(DataValidation) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DataValidationErrorStyle::to_repr(DataValidationErrorStyle) -> Reprpub(all) enum DataValidationFormula {
IntValue(Int)
DoubleValue(Double)
TextValue(String)
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DataValidationFormula::to_repr(DataValidationFormula) -> Reprpub(all) enum DataValidationOperator {
Between
Equal
GreaterThan
GreaterThanOrEqual
LessThan
LessThanOrEqual
NotBetween
NotEqual
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DataValidationOperator::to_repr(DataValidationOperator) -> Reprpub(all) enum DataValidationType {
NoneType
Custom
Date
Decimal
List
TextLength
Time
Whole
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DataValidationType::to_repr(DataValidationType) -> Reprpub struct DefinedName {
name : String
refers_to : String
scope : String
comment : String
} derive(Debug)fn DefinedName::new(name : String, refers_to : String, scope? : String, comment? : String) -> DefinedName#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn DefinedName::to_repr(DefinedName) -> Repr// Solid yellow fill
let fill = Fill::solid("FFFF00")
// Gradient fill
let gradient = Fill::gradient("FF0000", "0000FF", shading=1)let gradient = Fill::gradient("FF0000", "0000FF") // Red to bluelet yellow = Fill::solid("FFFF00")
let semi_transparent = Fill::solid("FF0000", transparency=50)pub struct Font {
bold : Bool?
italic : Bool?
strike : Bool?
outline : Bool?
shadow : Bool?
condense : Bool?
extended : Bool?
underline : String?
size : Double?
color : String?
color_theme : Int?
color_indexed : Int?
color_tint : Double?
charset : Int?
family_number : Int?
scheme : String?
vert_align : String?
family : String?
} derive(Eq, Debug)let font = Font::with_values(
bold=true,
size=12.0,
color="FF0000", // Red
underline="single",
)fn Font::with_values(bold? : Bool, italic? : Bool, strike? : Bool, outline? : Bool, shadow? : Bool, condense? : Bool, extended? : Bool, underline? : String, size? : Double, color? : String, color_theme? : Int, color_indexed? : Int, color_tint? : Double, charset? : Int, family_number? : Int, scheme? : String, vert_align? : String, family? : String) -> Fontpub struct FormControl {
cell : String
control_type : String
text : String
macro_name : String?
checked : Bool?
cell_link : String?
width : Int?
height : Int?
current_val : Int?
min_val : Int?
max_val : Int?
inc_change : Int?
page_change : Int?
horizontally : Bool?
format : GraphicOptions
paragraph : Array[RichTextRun]
} derive(Debug)fn FormControl::new(cell : String, control_type : String, text? : String) -> FormControl raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn FormControl::to_repr(FormControl) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn FormControlVmlPreset::to_repr(FormControlVmlPreset) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn FormulaOpts::to_repr(FormulaOpts) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn FormulaType::to_repr(FormulaType) -> Reprpub struct GraphicOptions {
offset_x : Int?
offset_y : Int?
scale_x : Double?
scale_y : Double?
hyperlink : String?
hyperlink_type : HyperlinkType?
name : String?
alt_text : String?
lock_aspect_ratio : Bool?
auto_fit : Bool?
auto_fit_ignore_aspect : Bool?
print_object : Bool?
locked : Bool?
positioning : PicturePositioning?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn GraphicOptions::to_repr(GraphicOptions) -> Reprfn GraphicOptions::with_values(offset_x? : Int, offset_y? : Int, scale_x? : Double, scale_y? : Double, hyperlink? : String, hyperlink_type? : HyperlinkType, name? : String, alt_text? : String, lock_aspect_ratio? : Bool, auto_fit? : Bool, auto_fit_ignore_aspect? : Bool, print_object? : Bool, locked? : Bool, positioning? : PicturePositioning) -> GraphicOptionstype HeaderFooterImagepub struct HeaderFooterImageOptions {
position : HeaderFooterImagePosition
data : Bytes
file : String?
extension : String
is_footer : Bool
first_page : Bool
width : String
height : String
} derive(Debug)fn HeaderFooterImageOptions::from_file(position : HeaderFooterImagePosition, file : String, is_footer? : Bool, first_page? : Bool, width? : String, height? : String) -> HeaderFooterImageOptions raise XlsxErrorfn HeaderFooterImageOptions::new(position : HeaderFooterImagePosition, data : Bytes, extension : String, is_footer? : Bool, first_page? : Bool, width? : String, height? : String) -> HeaderFooterImageOptions#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterImageOptions::to_repr(HeaderFooterImageOptions) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterImagePosition::equal(HeaderFooterImagePosition, HeaderFooterImagePosition) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterImagePosition::not_equal(x : HeaderFooterImagePosition, y : HeaderFooterImagePosition) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterImagePosition::to_repr(HeaderFooterImagePosition) -> Reprpub struct HeaderFooterOptions {
align_with_margins : Bool?
different_first : Bool
different_odd_even : Bool
scale_with_doc : Bool?
odd_header : String
odd_footer : String
even_header : String
even_footer : String
first_header : String
first_footer : String
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HeaderFooterOptions::to_repr(HeaderFooterOptions) -> Reprfn HeaderFooterOptions::with_values(align_with_margins? : Bool, different_first? : Bool, different_odd_even? : Bool, scale_with_doc? : Bool, odd_header? : String, odd_footer? : String, even_header? : String, even_footer? : String, first_header? : String, first_footer? : String) -> HeaderFooterOptionspub struct Hyperlink {
reference : String
target : String
link_type : HyperlinkType
location : String?
display : String?
tooltip : String?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HyperlinkOpts::to_repr(HyperlinkOpts) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HyperlinkType::equal(HyperlinkType, HyperlinkType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HyperlinkType::not_equal(x : HyperlinkType, y : HyperlinkType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn HyperlinkType::to_repr(HyperlinkType) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn IgnoredError::equal(IgnoredError, IgnoredError) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn IgnoredError::not_equal(x : IgnoredError, y : IgnoredError) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn IgnoredError::to_repr(IgnoredError) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn IgnoredErrorType::equal(IgnoredErrorType, IgnoredErrorType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn IgnoredErrorType::not_equal(x : IgnoredErrorType, y : IgnoredErrorType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn IgnoredErrorType::to_repr(IgnoredErrorType) -> Repr#alias(Picture)
pub struct Image {
reference : String
data : Bytes
extension : String
content_type : String
offset_x : Int
offset_y : Int
scale_x : Double
scale_y : Double
width_emu : Int
height_emu : Int
print_object : Bool
locked : Bool
hyperlink : String
hyperlink_type : HyperlinkType
name : String
alt_text : String
lock_aspect_ratio : Bool
positioning : PicturePositioning
// private fields
}#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn NumberFormat::equal(NumberFormat, NumberFormat) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn NumberFormat::not_equal(x : NumberFormat, y : NumberFormat) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn NumberFormat::to_repr(NumberFormat) -> Reprpub struct Options {
max_calc_iterations : UInt
password : String
raw_cell_value : Bool
tmp_dir : String
short_date_pattern : String
long_date_pattern : String
long_time_pattern : String
culture_info : String
} derive(Debug)pub struct PageLayoutMarginsOptions {
top : Double?
bottom : Double?
left : Double?
right : Double?
header : Double?
footer : Double?
horizontally : Bool?
vertically : Bool?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PageLayoutMarginsOptions::to_repr(PageLayoutMarginsOptions) -> Reprfn PageLayoutMarginsOptions::with_values(top? : Double, bottom? : Double, left? : Double, right? : Double, header? : Double, footer? : Double, horizontally? : Bool, vertically? : Bool) -> PageLayoutMarginsOptionspub struct PageLayoutOptions {
size : Int?
orientation : String?
first_page_number : Int?
adjust_to : Int?
fit_to_height : Int?
fit_to_width : Int?
black_and_white : Bool?
page_order : String?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PageLayoutOptions::to_repr(PageLayoutOptions) -> Reprfn PageLayoutOptions::with_values(size? : Int, orientation? : String, first_page_number? : Int, adjust_to? : Int, fit_to_height? : Int, fit_to_width? : Int, black_and_white? : Bool, page_order? : String) -> PageLayoutOptions#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PicturePositioning::to_repr(PicturePositioning) -> Reprpub struct PivotTable {
name : String
table_id : Int
cache_id : Int
table_xml : String
cache_definition_xml : String
cache_records_xml : String?
}pub struct PivotTableField {
data : String
name : String
subtotal : String
num_fmt : Int
compact : Bool
outline : Bool
show_all : Bool
insert_blank_row : Bool
default_subtotal : Bool
} derive(Debug)fn PivotTableField::new(data : String, name? : String, subtotal? : String, num_fmt? : Int, compact? : Bool, outline? : Bool, show_all? : Bool, insert_blank_row? : Bool, default_subtotal? : Bool) -> PivotTableField raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PivotTableField::to_repr(PivotTableField) -> Reprpub(all) struct PivotTableOptions {
data_range : String
pivot_table_range : String
name : String
rows : Array[PivotTableField]
columns : Array[PivotTableField]
data : Array[PivotTableField]
filter : Array[PivotTableField]
row_grand_totals : Bool
col_grand_totals : Bool
show_drill : Bool
use_auto_formatting : Bool
page_over_then_down : Bool
merge_item : Bool
classic_layout : Bool
compact_data : Bool
show_error : Bool
show_row_headers : Bool
show_col_headers : Bool
show_row_stripes : Bool
show_col_stripes : Bool
show_last_column : Bool
field_print_titles : Bool
item_print_titles : Bool
pivot_table_style_name : String
} derive(Debug)fn PivotTableOptions::new(data_range : String, pivot_table_range : String) -> PivotTableOptions raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PivotTableOptions::to_repr(PivotTableOptions) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Protection::equal(Protection, Protection) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Protection::not_equal(x : Protection, y : Protection) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn Protection::to_repr(Protection) -> Reprpub struct ReadLimits {
// private fields
}fn ReadLimits::with_values(max_package_bytes? : Int, max_archive_entries? : Int, max_entry_uncompressed_bytes? : Int, max_total_uncompressed_bytes? : Int, max_total_preserved_source_bytes? : Int, max_xml_part_bytes? : Int, max_total_xml_bytes? : Int, max_xml_markup_tokens? : Int, max_relationship_records? : Int, max_relationship_id_chars? : Int, max_relationship_type_chars? : Int, max_relationship_target_chars? : Int, max_total_relationship_chars? : Int, max_materialized_cells? : Int, max_materialized_row_column_dimensions? : Int, max_row_column_dimension_work? : Int, max_kdf_iterations? : Int, max_workbook_sheets? : Int, max_parser_items? : Int, max_parser_work_units? : Int) -> ReadLimits raise XlsxErrorpub(all) struct RichTextFont {
bold : Bool
italic : Bool
strike : Bool
outline : Bool
shadow : Bool
condense : Bool
extended : Bool
underline : String?
size : Double?
color : String?
color_theme : Int?
color_indexed : Int?
color_tint : Double?
charset : Int?
family_number : Int?
scheme : String?
vert_align : String?
family : String?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RichTextFont::to_repr(RichTextFont) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RichTextRun::to_repr(RichTextRun) -> Reprtype RichValueImages#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RowDimension::equal(RowDimension, RowDimension) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RowDimension::not_equal(x : RowDimension, y : RowDimension) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn RowDimension::to_repr(RowDimension) -> Reprpub struct RowOpts {
height : Double
hidden : Bool
style_id : Int
outline_level : Int
} derive(Debug)pub(all) enum RowStateClass {
Cells
RowDimensions
MergedRanges
ConditionalFormats
DataValidations
HyperlinkAnchors
InternalLinkTargets
AutoFilterRange
TableRanges
SparklineAnchors
ImageAnchors
ChartAnchors
ShapeAnchors
FormControlAnchors
SlicerAnchors
CommentAnchors
IgnoredErrorRanges
RowPageBreaks
CellValueMetadata
DimensionRef
PreservedDrawingAnchors
VmlContent
UnknownExtensions
ViewState
DefinedNameReferences
SheetScopedNamesUnadjusted
} derive(Eq, Debug)pub struct RowStateEntry {
class : RowStateClass
extent : RowStateExtent
handling : RowStateHandling
} derive(Eq, Debug)pub struct Shape {
reference : String
cell : String
shape_type : String
macro_alias : String
macro_name : String
format : GraphicOptions
text : String
paragraph : Array[RichTextRun]
width : Int
height : Int
scale_x : Double
scale_y : Double
fill : ShapeFill
fill_color : String
fill_transparency : Int
line : ShapeLine
line_color : String
line_width : Double
name : String
alt_text : String
print_object : Bool
locked : Bool
positioning : PicturePositioning
// private fields
} derive(Debug)fn Shape::new(reference : String, shape_type : String, macro_name? : String, text? : String, paragraph? : Array[RichTextRun], width? : Int, height? : Int, scale_x? : Double, scale_y? : Double, fill_color? : String, fill_transparency? : Int, line_color? : String, line_width? : Double, name? : String, alt_text? : String, print_object? : Bool, locked? : Bool, positioning? : PicturePositioning) -> Shape raise XlsxErrorpub struct SharedFormulaLimits {
// private fields
}fn SharedFormulaLimits::with_values(max_input_chars? : Int, max_output_chars? : Int, max_total_output_chars? : Int, max_work_units? : Int) -> SharedFormulaLimits raise XlsxErrorpub struct SharedFormulaMaster {
// private fields
}fn SharedFormulaMaster::translate_to(self : SharedFormulaMaster, row : Int, column : Int) -> String raise XlsxErrorfn SharedFormulaMaster::translate_to_limited(self : SharedFormulaMaster, row : Int, column : Int, maximum_input_chars~ : Int, maximum_output_chars~ : Int, maximum_work_units~ : Int, cancelled? : () -> Bool) -> (String, Int) raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetBackground::to_repr(SheetBackground) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetEntry::to_repr(SheetEntry) -> Reprpub struct SheetPropsOptions {
code_name : String?
enable_format_conditions_calculation : Bool?
published : Bool?
auto_page_breaks : Bool?
fit_to_page : Bool?
tab_color_indexed : Int?
tab_color_rgb : String?
tab_color_theme : Int?
tab_color_tint : Double?
outline_summary_below : Bool?
outline_summary_right : Bool?
base_col_width : Int?
default_col_width : Double?
default_row_height : Double?
custom_height : Bool?
zero_height : Bool?
thick_top : Bool?
thick_bottom : Bool?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetPropsOptions::to_repr(SheetPropsOptions) -> Reprfn SheetPropsOptions::with_values(code_name? : String, enable_format_conditions_calculation? : Bool, published? : Bool, auto_page_breaks? : Bool, fit_to_page? : Bool, tab_color_indexed? : Int, tab_color_rgb? : String, tab_color_theme? : Int, tab_color_tint? : Double, outline_summary_below? : Bool, outline_summary_right? : Bool, base_col_width? : Int, default_col_width? : Double, default_row_height? : Double, custom_height? : Bool, zero_height? : Bool, thick_top? : Bool, thick_bottom? : Bool) -> SheetPropsOptionspub struct SheetProtection {
algorithm_name : String
password : String
hash_value : String
salt_value : String
spin_count : Int
sheet : Bool
objects : Bool
scenarios : Bool
format_cells : Bool
format_columns : Bool
format_rows : Bool
insert_columns : Bool
insert_rows : Bool
insert_hyperlinks : Bool
delete_columns : Bool
delete_rows : Bool
select_locked_cells : Bool
sort : Bool
auto_filter : Bool
pivot_tables : Bool
select_unlocked_cells : Bool
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetProtection::to_repr(SheetProtection) -> Reprpub struct SheetProtectionOptions {
algorithm_name : String
password : String
auto_filter : Bool
delete_columns : Bool
delete_rows : Bool
edit_objects : Bool
edit_scenarios : Bool
format_cells : Bool
format_columns : Bool
format_rows : Bool
insert_columns : Bool
insert_hyperlinks : Bool
insert_rows : Bool
pivot_tables : Bool
select_locked_cells : Bool
select_unlocked_cells : Bool
sort : Bool
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetProtectionOptions::to_repr(SheetProtectionOptions) -> Reprfn SheetProtectionOptions::with_values(algorithm_name? : String, password? : String, auto_filter? : Bool, delete_columns? : Bool, delete_rows? : Bool, edit_objects? : Bool, edit_scenarios? : Bool, format_cells? : Bool, format_columns? : Bool, format_rows? : Bool, insert_columns? : Bool, insert_hyperlinks? : Bool, insert_rows? : Bool, pivot_tables? : Bool, select_locked_cells? : Bool, select_unlocked_cells? : Bool, sort? : Bool) -> SheetProtectionOptions#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetState::equal(SheetState, SheetState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetState::not_equal(x : SheetState, y : SheetState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetState::to_repr(SheetState) -> Repr#alias(ViewOptions)
pub struct SheetViewOptions {
default_grid_color : Bool?
right_to_left : Bool?
show_formulas : Bool?
show_grid_lines : Bool?
show_row_col_headers : Bool?
show_ruler : Bool?
show_zeros : Bool?
top_left_cell : String?
view : String?
zoom_scale : Double?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SheetViewOptions::to_repr(SheetViewOptions) -> Reprfn SheetViewOptions::with_values(default_grid_color? : Bool, right_to_left? : Bool, show_formulas? : Bool, show_grid_lines? : Bool, show_row_col_headers? : Bool, show_ruler? : Bool, show_zeros? : Bool, top_left_cell? : String, view? : String, zoom_scale? : Double) -> SheetViewOptionspub struct Slicer {
name : String
cache : String
source_name : String
cell : String
table_sheet : String
table_name : String
caption : String
macro_name : String
width : Int
height : Int
display_header : Bool?
item_desc : Bool
format : GraphicOptions
// private fields
} derive(Debug)fn SlicerOptions::new(name : String, cell : String, table_sheet : String, table_name : String) -> SlicerOptions raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SlicerOptions::to_repr(SlicerOptions) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SparklineColor::to_repr(SparklineColor) -> Reprpub struct SparklineGroup {
sparkline_type : SparklineType
sparklines : Array[Sparkline]
options : SparklineGroupOptions
}pub struct SparklineGroupOptions {
display_empty_cells_as : String
date_axis : Bool
line_weight : Double?
manual_max : Int?
manual_min : Int?
markers : Bool
high : Bool
low : Bool
first : Bool
last : Bool
negative : Bool
display_x_axis : Bool
display_hidden : Bool
right_to_left : Bool
color_series : SparklineColor?
color_negative : SparklineColor?
color_axis : SparklineColor?
color_markers : SparklineColor?
color_first : SparklineColor?
color_last : SparklineColor?
color_high : SparklineColor?
color_low : SparklineColor?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SparklineGroupOptions::to_repr(SparklineGroupOptions) -> Reprpub struct SparklineOptions {
locations : Array[String]
ranges : Array[String]
location : Array[String]
range : Array[String]
sparkline_type : SparklineType
style : Int
weight : Double?
date_axis : Bool
markers : Bool
high : Bool
low : Bool
first : Bool
last : Bool
negative : Bool
axis : Bool
hidden : Bool
reverse : Bool
series_color : String?
negative_color : String?
markers_color : String?
first_color : String?
last_color : String?
high_color : String?
low_color : String?
max : Int
cust_max : Int
min : Int
cust_min : Int
manual_max : Int?
manual_min : Int?
empty_cells : String?
} derive(Debug)fn SparklineOptions::new(locations : ArrayView[String], ranges : ArrayView[String]) -> SparklineOptions raise XlsxErrorfn SparklineOptions::set_empty_cells(self : SparklineOptions, mode : StringView) -> Unit raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SparklineOptions::to_repr(SparklineOptions) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SparklineType::equal(SparklineType, SparklineType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SparklineType::not_equal(x : SparklineType, y : SparklineType) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn SparklineType::to_repr(SparklineType) -> Reprpub struct StreamCell {
value : String
value_type : CellValueType
rich_text : Array[RichTextRun]?
formula : String?
style_id : Int
// private fields
}fn StreamCell::new_rich_text(runs : ArrayView[RichTextRun], formula? : String, style_id? : Int) -> StreamCell raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn StreamState::equal(StreamState, StreamState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn StreamState::not_equal(x : StreamState, y : StreamState) -> Boolfn StreamWriter::add_table(self : StreamWriter, range_ref : String, name : String, columns : ArrayView[String], display_name? : String, style_name? : String, show_first_column? : Bool, show_last_column? : Bool, show_row_stripes? : Bool, show_column_stripes? : Bool, show_header_row? : Bool) -> Table raise XlsxErrorfn StreamWriter::merge_cell(self : StreamWriter, top_left : StringView, bottom_right : StringView) -> Unit raise XlsxErrorfn StreamWriter::new_duration_cell(self : StreamWriter, value : Duration, formula? : String, style_id? : Int) -> StreamCellfn StreamWriter::new_time_cell(self : StreamWriter, value : ZonedDateTime, formula? : String, style_id? : Int) -> StreamCellfn StreamWriter::set_col_outline_level(self : StreamWriter, col : Int, level : Int) -> Unit raise XlsxErrorfn StreamWriter::set_col_style(self : StreamWriter, start_col : Int, end_col : Int, style_id : Int) -> Unit raise XlsxErrorfn StreamWriter::set_col_visible(self : StreamWriter, start_col : Int, end_col : Int, visible : Bool) -> Unit raise XlsxErrorfn StreamWriter::set_col_width(self : StreamWriter, start_col : Int, end_col : Int, width : Double) -> Unit raise XlsxErrorfn StreamWriter::set_row(self : StreamWriter, start_ref : String, values : ArrayView[String], row_opts? : RowOpts) -> Unit raise XlsxErrorfn StreamWriter::set_row_cells(self : StreamWriter, start_ref : String, values : ArrayView[StreamCell], row_opts? : RowOpts) -> Unit raise XlsxErrorpub struct Style {
number_format : NumberFormat?
num_fmt : Int?
decimal_places : Int?
custom_num_fmt : String?
neg_red : Bool?
font : Font?
fill : Fill?
border : Array[Border]?
protection : Protection?
alignment : Alignment?
} derive(Eq, Debug)// Create a style with multiple elements
let style = Style::new()
.with_font(Font::with_values(bold=true, size=12.0))
.with_fill(Fill::solid("FFFF00"))
.with_alignment(Alignment::with_values(horizontal="center"))
// Register with workbook and apply to cell
let style_id = workbook.add_style(style)
sheet.set_cell_style("A1", style_id)let box_border = Style::border([
Border::with_values("left", color="000000", style=1),
Border::with_values("right", color="000000", style=1),
Border::with_values("top", color="000000", style=1),
Border::with_values("bottom", color="000000", style=1),
])let currency = Style::number_format("$#,##0.00")
let percent = Style::number_format("0.0%")
let date = Style::number_format("yyyy-mm-dd")pub struct Table {
id : Int
name : String
display_name : String
range : String
range_ref : String
columns : Array[String]
style_name : String
show_first_column : Bool
show_last_column : Bool
show_row_stripes : Bool
show_column_stripes : Bool
show_header_row : Bool
carries_source_formulas : Bool
}#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn TableOptions::to_repr(TableOptions) -> Reprpub struct Workbook {
styles : Array[Style]
conditional_styles : Array[Style]
defined_names : Array[DefinedName]
core_properties : CoreProperties
app_properties : AppProperties
custom_properties : Array[CustomProperty]
vba_project : Bytes?
workbook_props : WorkbookPropsOptions
calc_props : CalcPropsOptions
default_font : String
default_table_style : String
default_pivot_style : String
theme_colors : Array[String]?
theme_xml : String?
indexed_colors : Array[String]?
mru_colors_xml : String?
styles_ext_lst_xml : String?
io_context : WorkbookIOContext
options : Options
workbook_protection : WorkbookProtection?
active_sheet_index : Int
cell_images : Array[CellImage]
rich_value_images : RichValueImages?
rich_value_media : Map[String, Bytes]
package_features : XlsxPackageFeatures
// private fields
}fn Workbook::add_chart_sheet(self : Workbook, name : String, chart_xml : String) -> ChartSheet raise XlsxErrorfn Workbook::add_chart_sheet_with_options(self : Workbook, name : String, opts : ChartOptions) -> ChartSheet raise XlsxErrorfn Workbook::add_chart_with_options(self : Workbook, sheet_name : StringView, reference : String, opts : ChartOptions) -> Unit raise XlsxErrorfn Workbook::add_data_validation(self : Workbook, sheet_name : StringView, dv : DataValidation) -> Unit raise XlsxErrorfn Workbook::add_form_control(self : Workbook, sheet_name : StringView, control : FormControl) -> Unit raise XlsxErrorfn Workbook::add_header_footer_image(self : Workbook, sheet_name : StringView, options : HeaderFooterImageOptions) -> Unit raise XlsxErrorasync fn Workbook::add_header_footer_image_from_file(self : Workbook, sheet_name : StringView, options : HeaderFooterImageOptions) -> Unit raise XlsxErrorfn Workbook::add_ignored_errors(self : Workbook, sheet_name : StringView, range_ref : String, error_type : IgnoredErrorType) -> Unit raise XlsxErrorfn Workbook::add_image(self : Workbook, sheet_name : StringView, reference : String, data : Bytes, extension : String, content_type : String, offset_x? : Int, offset_y? : Int, scale_x? : Double, scale_y? : Double, hyperlink? : String, hyperlink_type? : HyperlinkType, name? : String, alt_text? : String, lock_aspect_ratio? : Bool, auto_fit? : Bool, auto_fit_ignore_aspect? : Bool, print_object? : Bool, locked? : Bool, positioning? : PicturePositioning) -> Unit raise XlsxErrorfn Workbook::add_image_with_options(self : Workbook, sheet_name : StringView, reference : String, data : Bytes, extension : String, content_type : String, options : GraphicOptions) -> Unit raise XlsxErrorasync fn Workbook::add_picture(self : Workbook, sheet_name : StringView, reference : String, path : String, offset_x? : Int, offset_y? : Int, scale_x? : Double, scale_y? : Double, hyperlink? : String, hyperlink_type? : HyperlinkType, name? : String, alt_text? : String, lock_aspect_ratio? : Bool, auto_fit? : Bool, auto_fit_ignore_aspect? : Bool, print_object? : Bool, locked? : Bool, positioning? : PicturePositioning) -> Unit raise XlsxErrorfn Workbook::add_picture_from_bytes(self : Workbook, sheet_name : StringView, reference : String, data : Bytes, extension : String, offset_x? : Int, offset_y? : Int, scale_x? : Double, scale_y? : Double, hyperlink? : String, hyperlink_type? : HyperlinkType, name? : String, alt_text? : String, lock_aspect_ratio? : Bool, auto_fit? : Bool, auto_fit_ignore_aspect? : Bool, print_object? : Bool, locked? : Bool, positioning? : PicturePositioning) -> Unit raise XlsxErrorfn Workbook::add_picture_from_bytes_with_options(self : Workbook, sheet_name : StringView, reference : String, data : Bytes, extension : String, options : GraphicOptions) -> Unit raise XlsxErrorasync fn Workbook::add_picture_with_options(self : Workbook, sheet_name : StringView, reference : String, path : String, options : GraphicOptions) -> Unit raise XlsxErrorfn Workbook::add_pivot_table(self : Workbook, opts : PivotTableOptions) -> PivotTable raise XlsxErrorfn Workbook::add_pivot_table_xml(self : Workbook, sheet_name : StringView, table_xml : String, cache_definition_xml : String, cache_records_xml? : String, name? : String) -> PivotTable raise XlsxErrorfn Workbook::add_slicer(self : Workbook, sheet_name : StringView, opts : SlicerOptions) -> Unit raise XlsxErrorfn Workbook::add_slicer_with_options(self : Workbook, sheet_name : StringView, opts : SlicerOptions) -> Unit raise XlsxErrorfn Workbook::add_sparkline(self : Workbook, sheet_name : StringView, options : SparklineOptions) -> Unit raise XlsxErrorfn Workbook::add_sparkline_basic(self : Workbook, sheet_name : StringView, location : String, range_ref : String, sparkline_type? : SparklineType) -> Unit raise XlsxErrorfn Workbook::add_sparkline_options(self : Workbook, sheet_name : StringView, options : SparklineOptions) -> Unit raise XlsxErrorfn Workbook::add_table(self : Workbook, sheet_name : StringView, options : TableOptions) -> Table raise XlsxErrorfn Workbook::add_table_with_columns(self : Workbook, sheet_name : StringView, range_ref : String, name : String, columns : ArrayView[String], display_name? : String, style_name? : String, show_first_column? : Bool, show_last_column? : Bool, show_row_stripes? : Bool, show_column_stripes? : Bool, show_header_row? : Bool) -> Table raise XlsxErrorfn Workbook::auto_filter(self : Workbook, sheet_name : StringView, range_ref : String, options : ArrayView[AutoFilterOption]) -> Unit raise XlsxErrorfn Workbook::calc_cell_typed(self : Workbook, sheet_name : StringView, reference : StringView, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> CellValue? raise XlsxErrorfn Workbook::calc_cell_typed_rc(self : Workbook, sheet_name : StringView, row : Int, col : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> CellValue? raise XlsxErrorfn Workbook::calc_cell_value(self : Workbook, sheet_name : StringView, reference : StringView, raw? : Bool, options? : Options, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> String raise XlsxErrorfn Workbook::calc_cell_value_rc(self : Workbook, sheet_name : StringView, row : Int, col : Int, raw? : Bool, options? : Options, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> String raise XlsxErrorfn Workbook::delete_defined_name(self : Workbook, defined_name : DefinedName) -> Unit raise XlsxErrorfn Workbook::duplicate_row(self : Workbook, sheet_name : StringView, row : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::duplicate_row_to(self : Workbook, sheet_name : StringView, row : Int, target_row : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::get_auto_filter(self : Workbook, sheet_name : StringView) -> AutoFilter? raise XlsxErrorfn Workbook::get_cell_rich_text(self : Workbook, sheet_name : StringView, reference : StringView) -> Array[RichTextRun]? raise XlsxErrorfn Workbook::get_cell_type(self : Workbook, sheet_name : StringView, reference : StringView) -> CellValueType? raise XlsxErrorfn Workbook::get_col_dimensions(self : Workbook, sheet_name : StringView) -> Array[(Int, ColDimension)] raise XlsxErrorfn Workbook::get_data_validations(self : Workbook, sheet_name : StringView) -> Array[DataValidation] raise XlsxErrorfn Workbook::get_form_controls(self : Workbook, sheet_name : StringView) -> Array[FormControl] raise XlsxErrorfn Workbook::get_header_footer(self : Workbook, sheet_name : StringView) -> HeaderFooterOptions? raise XlsxErrorfn Workbook::get_header_footer_images(self : Workbook, sheet_name : StringView) -> Array[HeaderFooterImageOptions] raise XlsxErrorfn Workbook::get_hyper_link_cells(self : Workbook, sheet_name : StringView, link_type? : HyperlinkType) -> Array[String] raise XlsxErrorfn Workbook::get_hyperlink_cells(self : Workbook, sheet_name : StringView, link_type? : HyperlinkType) -> Array[String] raise XlsxErrorfn Workbook::get_page_layout(self : Workbook, sheet_name : StringView) -> PageLayoutOptions raise XlsxErrorfn Workbook::get_page_margins(self : Workbook, sheet_name : StringView) -> PageLayoutMarginsOptions raise XlsxErrorfn Workbook::get_pivot_tables(self : Workbook, sheet_name : StringView) -> Array[PivotTable] raise XlsxErrorfn Workbook::get_row_dimensions(self : Workbook, sheet_name : StringView) -> Array[(Int, RowDimension)] raise XlsxErrorfn Workbook::get_sheet_props(self : Workbook, sheet_name : StringView) -> SheetPropsOptions raise XlsxErrorfn Workbook::get_sheet_protection(self : Workbook, sheet_name : StringView) -> SheetProtectionOptions raise XlsxErrorfn Workbook::get_sheet_view(self : Workbook, sheet_name : StringView, view_index : Int) -> SheetViewOptions raise XlsxErrorfn Workbook::insert_cols(self : Workbook, sheet_name : StringView, col : Int, count : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::insert_rows(self : Workbook, sheet_name : StringView, row : Int, count : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::new_stream_writer(self : Workbook, sheet_name : StringView) -> StreamWriter raise XlsxErrorfn Workbook::protect_sheet(self : Workbook, sheet_name : StringView, options : SheetProtectionOptions) -> Unit raise XlsxErrorfn Workbook::protect_workbook(self : Workbook, options? : WorkbookProtectionOptions) -> Unit raise XlsxErrorfn Workbook::remove_col(self : Workbook, sheet_name : StringView, col : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::remove_cols(self : Workbook, sheet_name : StringView, col : Int, count : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::remove_row(self : Workbook, sheet_name : StringView, row : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::remove_rows(self : Workbook, sheet_name : StringView, row : Int, count : Int, formula_limits? : SharedFormulaLimits, cancelled? : () -> Bool) -> Unit raise XlsxErrorfn Workbook::set_auto_filter(self : Workbook, sheet_name : StringView, range_ref : String, options : ArrayView[AutoFilterOption]) -> Unit raise XlsxErrorfn Workbook::set_cell_formula_opts(self : Workbook, sheet_name : StringView, reference : String, formula : String, opts? : FormulaOpts, value? : String) -> Unit raise XlsxErrorfn Workbook::set_cell_hyper_link(self : Workbook, sheet_name : StringView, reference : String, target : String, link_type : HyperlinkType, display? : String, tooltip? : String) -> Unit raise XlsxErrorfn Workbook::set_cell_hyperlink(self : Workbook, sheet_name : StringView, reference : String, target : String, link_type : HyperlinkType, display? : String, tooltip? : String) -> Unit raise XlsxErrorfn Workbook::set_cell_hyperlink_opts(self : Workbook, sheet_name : StringView, reference : String, target : String, link_type : HyperlinkType, opts? : HyperlinkOpts) -> Unit raise XlsxErrorfn Workbook::set_cell_rich_text(self : Workbook, sheet_name : StringView, reference : String, runs : ArrayView[RichTextRun]) -> Unit raise XlsxErrorfn Workbook::set_cell_time(self : Workbook, sheet_name : StringView, reference : String, value : ZonedDateTime) -> Unit raise XlsxErrorfn Workbook::set_conditional_format(self : Workbook, sheet_name : StringView, range_ref : String, options : ArrayView[ConditionalFormatOptions]) -> Unit raise XlsxErrorfn Workbook::set_header_footer(self : Workbook, sheet_name : StringView, options : HeaderFooterOptions?) -> Unit raise XlsxErrorfn Workbook::set_page_layout(self : Workbook, sheet_name : StringView, options : PageLayoutOptions?) -> Unit raise XlsxErrorfn Workbook::set_page_margins(self : Workbook, sheet_name : StringView, options : PageLayoutMarginsOptions?) -> Unit raise XlsxErrorfn Workbook::set_sheet_props(self : Workbook, sheet_name : StringView, options : SheetPropsOptions?) -> Unit raise XlsxErrorfn Workbook::set_sheet_view(self : Workbook, sheet_name : StringView, view_index : Int, options : SheetViewOptions) -> Unit raise XlsxErrorfn Workbook::sheet_row_state_inventory(self : Workbook, sheet_name : StringView) -> Array[RowStateEntry] raise XlsxErrorpub struct WorkbookPropsOptions {
date_1904 : Bool?
filter_privacy : Bool?
code_name : String?
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn WorkbookPropsOptions::to_repr(WorkbookPropsOptions) -> Reprfn WorkbookPropsOptions::with_values(date_1904? : Bool, filter_privacy? : Bool, code_name? : String) -> WorkbookPropsOptions#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn WorkbookProtection::to_repr(WorkbookProtection) -> Reprpub struct WorkbookProtectionOptions {
algorithm_name : String
password : String
lock_structure : Bool
lock_windows : Bool
} derive(Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn WorkbookProtectionOptions::to_repr(WorkbookProtectionOptions) -> Reprfn WorkbookProtectionOptions::with_values(algorithm_name? : String, password? : String, lock_structure? : Bool, lock_windows? : Bool) -> WorkbookProtectionOptionspub struct Worksheet {
name : String
sheet_views : Array[SheetView]
dimension_ref : String?
cells : Array[Cell]
cell_index : Map[String, Int]
cell_index_valid : Bool
shared_formula_masters_index : Map[UInt, SharedFormulaMaster]
shared_formula_masters_index_valid : Bool
merged_cells : Array[String]
hyperlinks : Array[Hyperlink]
tables : Array[Table]
sparkline_groups : Array[SparklineGroup]
pivot_tables : Array[PivotTable]
images : Array[Image]
header_footer_images : Array[HeaderFooterImage]
charts : Array[Chart]
shapes : Array[Shape]
form_controls : Array[FormControl]
slicers : Array[Slicer]
data_validations : Array[String]
conditional_formats : Array[String]
x14_data_bars : Map[String, X14DataBarProps]
unknown_ext_blocks : Array[String]
x14_cf_rule_id_counter : Int
ignored_errors : Array[IgnoredError]
comments : Array[Comment]
auto_filter : AutoFilter?
page_margins : PageLayoutMarginsOptions?
page_layout : PageLayoutOptions?
header_footer : HeaderFooterOptions?
sheet_protection : SheetProtection?
sheet_props : SheetPropsOptions?
sheet_background : SheetBackground?
row_breaks : Array[PageBreak]
col_breaks : Array[PageBreak]
row_dimensions : Map[Int, RowDimension]
col_dimensions : Map[Int, ColDimension]
state : SheetState
stream_state : StreamState
vml_drawing_xml : String?
vml_drawing_hf_xml : String?
cell_vm : Map[String, Int]
// private fields
}fn Worksheet::add_chart_with_options(self : Worksheet, reference : String, opts : ChartOptions) -> Unit raise XlsxErrorfn Worksheet::add_header_footer_image(self : Worksheet, options : HeaderFooterImageOptions) -> Unit raise XlsxErrorfn Worksheet::add_ignored_errors(self : Worksheet, range_ref : String, error_type : IgnoredErrorType) -> Unit raise XlsxErrorfn Worksheet::add_image(self : Worksheet, reference : String, data : Bytes, extension : String, content_type : String, offset_x? : Int, offset_y? : Int, scale_x? : Double, scale_y? : Double, hyperlink? : String, hyperlink_type? : HyperlinkType, name? : String, alt_text? : String, lock_aspect_ratio? : Bool, auto_fit? : Bool, auto_fit_ignore_aspect? : Bool, print_object? : Bool, locked? : Bool, positioning? : PicturePositioning) -> Unit raise XlsxErrorfn Worksheet::add_pivot_table_xml(self : Worksheet, table_xml : String, cache_definition_xml : String, cache_records_xml? : String, name? : String) -> PivotTable raise XlsxErrorfn Worksheet::add_sparkline(self : Worksheet, location : String, range_ref : String, sparkline_type? : SparklineType) -> Unit raise XlsxErrorfn Worksheet::add_sparkline_options(self : Worksheet, options : SparklineOptions) -> Unit raise XlsxErrorfn Worksheet::add_table(self : Worksheet, range_ref : String, name : String, columns : ArrayView[String], display_name? : String, style_name? : String, show_first_column? : Bool, show_last_column? : Bool, show_row_stripes? : Bool, show_column_stripes? : Bool, show_header_row? : Bool) -> Table raise XlsxErrorfn Worksheet::get_cell_formula_info_rc(self : Worksheet, row : Int, col : Int) -> CellFormulaInfo? raise XlsxErrorfn Worksheet::get_cell_rich_text(self : Worksheet, reference : StringView) -> Array[RichTextRun]? raise XlsxErrortest {
let workbook = @xlsx.Workbook::new()
ignore(workbook.add_sheet("Sheet1"))
let sheet = workbook.sheet("Sheet1").unwrap()
debug_inspect(sheet.materialized_col_dimensions(), content="[]")
workbook.set_col_width("Sheet1", 3, 18.5)
workbook.set_col_visible("Sheet1", 1, false)
let summary : Array[(Int, Double?, Bool)] = []
for entry in sheet.materialized_col_dimensions() {
let (col, dim) = entry
summary.push((col, dim.width, dim.hidden))
}
debug_inspect(summary, content="[(1, None, true), (3, Some(18.5), false)]")
}test {
let workbook = @xlsx.Workbook::new()
ignore(workbook.add_sheet("Sheet1"))
let sheet = workbook.sheet("Sheet1").unwrap()
debug_inspect(sheet.materialized_row_dimensions(), content="[]")
workbook.set_row_visible("Sheet1", 7000, false)
workbook.set_row_height("Sheet1", 2, 24.5)
let summary : Array[(Int, Double?, Bool)] = []
for entry in sheet.materialized_row_dimensions() {
let (row, dim) = entry
summary.push((row, dim.height, dim.hidden))
}
debug_inspect(summary, content="[(2, Some(24.5), false), (7000, None, true)]")
}fn Worksheet::protect_sheet(self : Worksheet, options : SheetProtectionOptions) -> Unit raise XlsxErrorfn Worksheet::set_auto_filter(self : Worksheet, range_ref : String, options : ArrayView[AutoFilterOption]) -> Unit raise XlsxErrorfn Worksheet::set_cell_formula_opts(self : Worksheet, reference : String, formula : String, opts? : FormulaOpts, value? : String) -> Unit raise XlsxErrorfn Worksheet::set_cell_hyperlink(self : Worksheet, reference : String, target : String, link_type : HyperlinkType, display? : String, tooltip? : String) -> Unit raise XlsxErrorfn Worksheet::set_cell_hyperlink_opts(self : Worksheet, reference : String, target : String, link_type : HyperlinkType, opts? : HyperlinkOpts) -> Unit raise XlsxErrorfn Worksheet::set_cell_rich_text(self : Worksheet, reference : String, runs : ArrayView[RichTextRun]) -> Unit raise XlsxErrorfn Worksheet::set_conditional_format(self : Worksheet, range_ref : String, options : ArrayView[ConditionalFormatOptions]) -> Unit raise XlsxErrorfn Worksheet::set_header_footer(self : Worksheet, options : HeaderFooterOptions?) -> Unit raise XlsxErrorfn Worksheet::set_page_layout(self : Worksheet, options : PageLayoutOptions?) -> Unit raise XlsxErrorfn Worksheet::set_page_margins(self : Worksheet, options : PageLayoutMarginsOptions?) -> Unit raise XlsxErrorfn Worksheet::shared_formula_master(self : Worksheet, shared_index : UInt, cancelled? : () -> Bool) -> SharedFormulaMaster? raise XlsxErrorfn Worksheet::shared_formula_masters(self : Worksheet) -> Map[UInt, SharedFormulaMaster] raise XlsxErrorpub struct WriteLimits {
// private fields
}fn WriteLimits::with_values(max_output_bytes~ : Int, max_archive_entries~ : Int, max_entry_uncompressed_bytes~ : Int, max_total_uncompressed_bytes~ : Int) -> WriteLimits raise XlsxError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn X14DataBarProps::to_repr(X14DataBarProps) -> Reprpub struct XlsxPackageFeatures {
external_links : Bool
query_tables : Bool
connections : Bool
pivot_parts : Bool
vml_present : Bool
unknown_parts : Bool
first_external_link : String?
first_query_table : String?
first_connections : String?
first_pivot_part : String?
first_vml_part : String?
first_unknown_part : String?
} derive(Eq, Debug)fn builtin_number_format_code(id : Int) -> String?test {
debug_inspect(
@xlsx.builtin_number_format_code(4),
content="Some(\"#,##0.00\")",
)
debug_inspect(
@xlsx.builtin_number_format_code(14),
content="Some(\"mm-dd-yy\")",
)
debug_inspect(@xlsx.builtin_number_format_code(0), content="None")
debug_inspect(@xlsx.builtin_number_format_code(30), content="None")
}fn conditional_format_xml_range_count_limited(xml : StringView, maximum_ranges : Int, maximum_work_units : Int, cancelled? : () -> Bool) -> Int raise XlsxErrorfn decrypt(raw : BytesView, options? : Options, limits? : ReadLimits, cancelled? : () -> Bool) -> Bytes raise XlsxErrorfn excel_date_to_time(excel_date : Double, use_1904_format? : Bool) -> ZonedDateTime raise XlsxErrorasync fn open_file(path : String, password? : String, options? : Options, limits? : ReadLimits, transcoder? : (String, Bytes) -> String raise XlsxError) -> Workbookasync fn[R : Reader] open_reader(reader : R, password? : String, options? : Options, limits? : ReadLimits, transcoder? : (String, Bytes) -> String raise XlsxError) -> Workbookfn read(bytes : BytesView, options? : Options, limits? : ReadLimits, cancelled? : () -> Bool, transcoder? : (String, Bytes) -> String raise XlsxError) -> Workbook raise XlsxErrorfn read_with_password(bytes : BytesView, password : String, options? : Options, limits? : ReadLimits, cancelled? : () -> Bool, transcoder? : (String, Bytes) -> String raise XlsxError) -> Workbook raise XlsxErrorasync fn[R : Reader] read_zip_reader(reader : R, password? : String, options? : Options, limits? : ReadLimits, transcoder? : (String, Bytes) -> String raise XlsxError) -> Workbookfn set_random_source(source : (Int) -> Bytes) -> Unittest {
let dt = @time.date_time(2021, 1, 1, hour=12)
inspect(@xlsx.time_to_excel_date(dt), content="44197.5")
}fn validate_ooxml_bounded_archive(archive : Archive, limits? : ReadLimits) -> Array[String] raise XlsxErrorA MoonBit port of the Go excelize library for reading and writing XLSX (Excel) spreadsheets.
Dependencies