Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 2164 lines (123 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: Xlsx  - X-Ref

__construct()   X-Ref
Create a new Xlsx Reader instance.


canRead(string $filename)   X-Ref
Can the current IReader read the file?


testSimpleXml($value)   X-Ref

param: mixed $value

getAttributes(?SimpleXMLElement $value, string $ns = '')   X-Ref
No description

xpathNoFalse(SimpleXmlElement $sxml, string $path)   X-Ref
No description

falseToArray($value)   X-Ref

param: mixed $value

loadZip(string $filename, string $ns = '')   X-Ref
No description

loadZipNonamespace(string $filename, string $ns)   X-Ref
No description

listWorksheetNames($filename)   X-Ref
Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object.

param: string $filename
return: array

listWorksheetInfo($filename)   X-Ref
Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).

param: string $filename
return: array

castToBoolean(SimpleXMLElement $c)   X-Ref
No description

castToError(?SimpleXMLElement $c)   X-Ref
No description

castToString(?SimpleXMLElement $c)   X-Ref
No description

castToFormula(?SimpleXMLElement $c, string $r, string &$cellDataType, &$value, &$calculatedValue, array &$sharedFormulas, string $castBaseType)   X-Ref

param: mixed $value
param: mixed $calculatedValue

fileExistsInArchive(ZipArchive $archive, $fileName = '')   X-Ref

param: string $fileName

getFromZipArchive(ZipArchive $archive, $fileName = '')   X-Ref

param: string $fileName
return: string

loadSpreadsheetFromFile(string $filename)   X-Ref
Loads Spreadsheet from file.


parseRichText(?SimpleXMLElement $is)   X-Ref

return: RichText

readRibbon(Spreadsheet $excel, string $customUITarget, ZipArchive $zip)   X-Ref
No description

getArrayItem($array, $key = 0)   X-Ref

param: null|array|bool|SimpleXMLElement $array
param: int|string $key
return: mixed

dirAdd($base, $add)   X-Ref

param: null|SimpleXMLElement|string $base
param: null|SimpleXMLElement|string $add

toCSSArray(string $style)   X-Ref
No description

stripWhiteSpaceFromStyleString(string $string)   X-Ref
No description

boolean($value)   X-Ref

param: mixed $value

readHyperLinkDrawing(\PhpOffice\PhpSpreadsheet\Worksheet\Drawing $objDrawing, SimpleXMLElement $cellAnchor, $hyperlinks)   X-Ref

param: array $hyperlinks

readProtection(Spreadsheet $excel, SimpleXMLElement $xmlWorkbook)   X-Ref
No description

getLockValue(SimpleXmlElement $protection, string $key)   X-Ref
No description

readFormControlProperties(Spreadsheet $excel, string $dir, string $fileWorksheet, Worksheet $docSheet, array &$unparsedLoadedData)   X-Ref
No description

readPrinterSettings(Spreadsheet $excel, string $dir, string $fileWorksheet, Worksheet $docSheet, array &$unparsedLoadedData)   X-Ref
No description

getWorkbookBaseName()   X-Ref
No description

readSheetProtection(Worksheet $docSheet, SimpleXMLElement $xmlSheet)   X-Ref
No description

readAutoFilterTables(SimpleXMLElement $xmlSheet,Worksheet $docSheet,string $dir,string $fileWorksheet,ZipArchive $zip)   X-Ref
No description

readAutoFilterTablesInTablesFile(SimpleXMLElement $xmlSheet,string $dir,string $fileWorksheet,ZipArchive $zip,Worksheet $docSheet)   X-Ref
No description

extractStyles(?SimpleXMLElement $sxml, string $node1, string $node2)   X-Ref
No description

extractPalette(?SimpleXMLElement $sxml)   X-Ref
No description