Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
dataformat_excel\writer Class Reference

Excel data format writer. More...

Inheritance diagram for dataformat_excel\writer:
core\dataformat\spout_base core\dataformat\base

Public Member Functions

 close_output ()
 Write the end of the file.
 
 close_sheet ($columns)
 Write the end of the sheet containing the data. More...
 
 get_extension ()
 Get the file extension. More...
 
 send_http_headers ()
 Output file headers to initialise the download of the file.
 
 set_filename ($filename)
 Set download filename base. More...
 
 set_sheettitle ($title)
 Set the title of the worksheet inside a spreadsheet. More...
 
 start_output ()
 Write the start of the file.
 
 start_sheet ($columns)
 Write the start of the sheet we will be adding data to. More...
 
 write_record ($record, $rownum)
 Write a single record. More...
 

Protected Attributes

$extension $extension = ".xlsx"
 
$filename $filename = ''
 
$mimetype $mimetype = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
 
$renamecurrentsheet $renamecurrentsheet = false
 
$sheettitle $sheettitle
 
$spouttype $spouttype = Box\Spout\Common\Type::XLSX
 
$writer $writer
 

Detailed Description

Excel data format writer.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ close_sheet()

core\dataformat\base::close_sheet (   $columns)
inherited

Write the end of the sheet containing the data.

Parameters
array$columns

Reimplemented in dataformat_json\writer, and dataformat_html\writer.

◆ get_extension()

core\dataformat\base::get_extension ( )
inherited

Get the file extension.

Return values
stringfile extension

◆ set_filename()

core\dataformat\base::set_filename (   $filename)
inherited

Set download filename base.

Parameters
string$filename

◆ set_sheettitle()

dataformat_excel\writer::set_sheettitle (   $title)

Set the title of the worksheet inside a spreadsheet.

For some formats this will be ignored.

Parameters
string$title

Reimplemented from core\dataformat\spout_base.

◆ start_sheet()

core\dataformat\spout_base::start_sheet (   $columns)
inherited

Write the start of the sheet we will be adding data to.

Parameters
array$columns

Reimplemented from core\dataformat\base.

◆ write_record()

core\dataformat\spout_base::write_record (   $record,
  $rownum 
)
inherited

Write a single record.

Parameters
object$record
int$rownum

Reimplemented from core\dataformat\base.


The documentation for this class was generated from the following file: