PHP Class XLSXWriter

ファイルを表示 Open project: mk-j/php_xlsxwriter Class Usage Examples

Protected Properties

Property Type Description
$author ------------------------------------------------------------------
$cell_formats
$cell_types contains excel format like YYYY-MM-DD HH:MM:SS
$current_sheet contains friendly format like datetime
$shared_string_count unique set
$shared_strings
$sheets
$temp_dir
$temp_files count of non-unique references to the unique set

Public Methods

Method Description
__construct ( )
__destruct ( )
array_first_key ( array $arr ) ------------------------------------------------------------------
convert_date_time ( $date_input ) ------------------------------------------------------------------
log ( $string ) ------------------------------------------------------------------
markMergedCell ( $sheet_name, $start_cell_row, $start_cell_column, $end_cell_row, $end_cell_column )
sanitize_filename ( $filename ) ------------------------------------------------------------------
setAuthor ( $author = '' )
setTempDir ( $dir )
writeSheet ( array $data, $sheet_name = '', array $header_types = [] )
writeSheetHeader ( $sheet_name, array $header_types, $suppress_row = false )
writeSheetRow ( $sheet_name, array $row )
writeToFile ( $filename )
writeToStdOut ( )
writeToString ( )
xlsCell ( $row_number, $column_number ) *
xmlspecialchars ( $val ) ------------------------------------------------------------------

Protected Methods

Method Description
buildAppXML ( )
buildContentTypesXML ( )
buildCoreXML ( )
buildRelationshipsXML ( )
buildWorkbookRelsXML ( )
buildWorkbookXML ( )
finalizeSheet ( $sheet_name )
initializeSheet ( $sheet_name )
setSharedString ( $v )
tempFilename ( )
writeCell ( XLSXWriter_BuffererWriter &$file, $row_number, $column_number, $value, $cell_format_index )
writeSharedStringsXML ( )
writeStylesXML ( )

Private Methods

Method Description
addCellFormat ( $cell_format )
determineCellType ( $cell_format )
escapeCellFormat ( $cell_format )

Method Details

__construct() public method

public __construct ( )

__destruct() public method

public __destruct ( )

array_first_key() public static method

------------------------------------------------------------------
public static array_first_key ( array $arr )
$arr array

buildAppXML() protected method

protected buildAppXML ( )

buildContentTypesXML() protected method

protected buildContentTypesXML ( )

buildCoreXML() protected method

protected buildCoreXML ( )

buildRelationshipsXML() protected method

protected buildRelationshipsXML ( )

buildWorkbookRelsXML() protected method

protected buildWorkbookRelsXML ( )

buildWorkbookXML() protected method

protected buildWorkbookXML ( )

convert_date_time() public static method

------------------------------------------------------------------
public static convert_date_time ( $date_input )

finalizeSheet() protected method

protected finalizeSheet ( $sheet_name )

initializeSheet() protected method

protected initializeSheet ( $sheet_name )

log() public static method

------------------------------------------------------------------
public static log ( $string )

markMergedCell() public method

public markMergedCell ( $sheet_name, $start_cell_row, $start_cell_column, $end_cell_row, $end_cell_column )

sanitize_filename() public static method

------------------------------------------------------------------
public static sanitize_filename ( $filename )

setAuthor() public method

public setAuthor ( $author = '' )

setSharedString() protected method

protected setSharedString ( $v )

setTempDir() public method

public setTempDir ( $dir )

tempFilename() protected method

protected tempFilename ( )

writeCell() protected method

protected writeCell ( XLSXWriter_BuffererWriter &$file, $row_number, $column_number, $value, $cell_format_index )
$file XLSXWriter_BuffererWriter

writeSharedStringsXML() protected method

protected writeSharedStringsXML ( )

writeSheet() public method

public writeSheet ( array $data, $sheet_name = '', array $header_types = [] )
$data array
$header_types array

writeSheetHeader() public method

public writeSheetHeader ( $sheet_name, array $header_types, $suppress_row = false )
$header_types array

writeSheetRow() public method

public writeSheetRow ( $sheet_name, array $row )
$row array

writeStylesXML() protected method

protected writeStylesXML ( )

writeToFile() public method

public writeToFile ( $filename )

writeToStdOut() public method

public writeToStdOut ( )

writeToString() public method

public writeToString ( )

xlsCell() public static method

*
public static xlsCell ( $row_number, $column_number )
$row_number int, zero based
$column_number int, zero based

xmlspecialchars() public static method

------------------------------------------------------------------
public static xmlspecialchars ( $val )

Property Details

$author protected_oe property

------------------------------------------------------------------
protected $author

$cell_formats protected_oe property

protected $cell_formats

$cell_types protected_oe property

contains excel format like YYYY-MM-DD HH:MM:SS
protected $cell_types

$current_sheet protected_oe property

contains friendly format like datetime
protected $current_sheet

$shared_string_count protected_oe property

unique set
protected $shared_string_count

$shared_strings protected_oe property

protected $shared_strings

$sheets protected_oe property

protected $sheets

$temp_dir protected_oe property

protected $temp_dir

$temp_files protected_oe property

count of non-unique references to the unique set
protected $temp_files