Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Class: Worksheet  - X-Ref

writeWorksheet(PhpspreadsheetWorksheet $worksheet, $stringTable = [], $includeCharts = false)   X-Ref
Write worksheet to XML format.

param: string[] $stringTable
param: bool $includeCharts Flag indicating if we should write charts
return: string XML Output

writeSheetPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write SheetPr.


writeDimension(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write Dimension.


writeSheetViews(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write SheetViews.


writeSheetFormatPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write SheetFormatPr.


writeCols(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write Cols.


writeSheetProtection(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write SheetProtection.


writeProtectionAttribute(XMLWriter $objWriter, string $name, ?bool $value)   X-Ref
No description

writeAttributeIf(XMLWriter $objWriter, ?bool $condition, string $attr, string $val)   X-Ref
No description

writeAttributeNotNull(XMLWriter $objWriter, string $attr, ?string $val)   X-Ref
No description

writeElementIf(XMLWriter $objWriter, bool $condition, string $attr, string $val)   X-Ref
No description

writeOtherCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate)   X-Ref
No description

writeTimePeriodCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate)   X-Ref
No description

writeTextCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate)   X-Ref
No description

writeExtConditionalFormattingElements(XMLWriter $objWriter, ConditionalFormattingRuleExtension $ruleExtension)   X-Ref
No description

writeDataBarElements(XMLWriter $objWriter, ?ConditionalDataBar $dataBar)   X-Ref
No description

writeConditionalFormatting(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write ConditionalFormatting.


writeDataValidations(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write DataValidations.


writeHyperlinks(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write Hyperlinks.


writeProtectedRanges(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write ProtectedRanges.


writeMergeCells(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write MergeCells.


writePrintOptions(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write PrintOptions.


writePageMargins(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write PageMargins.


writeAutoFilter(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write AutoFilter.


writeTable(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write Table.


writePageSetup(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write PageSetup.


writeHeaderFooter(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write Header / Footer.


writeBreaks(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write Breaks.


writeSheetData(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet, array $stringTable)   X-Ref
Write SheetData.

param: string[] $stringTable String table

writeCellInlineStr(XMLWriter $objWriter, string $mappedType, $cellValue)   X-Ref

param: RichText|string $cellValue

writeCellString(XMLWriter $objWriter, string $mappedType, $cellValue, array $flippedStringTable)   X-Ref

param: RichText|string $cellValue
param: string[] $flippedStringTable

writeCellNumeric(XMLWriter $objWriter, $cellValue)   X-Ref

param: float|int $cellValue

writeCellBoolean(XMLWriter $objWriter, string $mappedType, bool $cellValue)   X-Ref
No description

writeCellError(XMLWriter $objWriter, string $mappedType, string $cellValue, string $formulaerr = ')   X-Ref
No description

writeCellFormula(XMLWriter $objWriter, string $cellValue, Cell $cell)   X-Ref
No description

writeCell(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet, string $cellAddress, array $flippedStringTable)   X-Ref
Write Cell.

param: string $cellAddress Cell Address
param: string[] $flippedStringTable String table (flipped), for faster index searching

writeDrawings(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet, $includeCharts = false)   X-Ref
Write Drawings.

param: bool $includeCharts Flag indicating if we should include drawing details for charts

writeLegacyDrawing(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write LegacyDrawing.


writeLegacyDrawingHF(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
Write LegacyDrawingHF.


writeAlternateContent(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
No description

writeExtLst(XMLWriter $objWriter, PhpspreadsheetWorksheet $worksheet)   X-Ref
write <ExtLst>
only implementation conditionalFormattings.