Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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

(no description)

File Size: 2080 lines (118 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.

return: array
param: string $filename

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

return: array
param: string $filename

castToBoolean($c)   X-Ref
No description

castToError($c)   X-Ref
No description

castToString($c)   X-Ref
No description

castToFormula($c, $r, &$cellDataType, &$value, &$calculatedValue, &$sharedFormulas, $castBaseType)   X-Ref
No description

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

param: string $fileName

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

return: string
param: string $fileName

load(string $filename, int $flags = 0)   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
No description

dirAdd($base, $add)   X-Ref
No description

toCSSArray($style)   X-Ref
No description

stripWhiteSpaceFromStyleString($string)   X-Ref
No description

boolean($value)   X-Ref
No description

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, $dir, $fileWorksheet, $docSheet, array &$unparsedLoadedData)   X-Ref
No description

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

castXsdBooleanToBool($xsdBoolean)   X-Ref
Convert an 'xsd:boolean' XML value to a PHP boolean value.
A valid 'xsd:boolean' XML value can be one of the following
four values: 'true', 'false', '1', '0'.  It is case sensitive.

Note that just doing '(bool) $xsdBoolean' is not safe,
since '(bool) "false"' returns true.

return: bool  Boolean value
param: string $xsdBoolean An XML string value of type 'xsd:boolean'

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