\PhpOffice\PhpSpreadsheet\Writer\PdfTcpdf

Summary

Methods
Properties
Constants
__construct()
getFont()
setFont()
getPaperSize()
setPaperSize()
getOrientation()
setOrientation()
getTempDir()
setTempDir()
save()
generateHtmlAll()
setEditHtmlCallback()
getSheetIndex()
setSheetIndex()
getGenerateSheetNavigationBlock()
setGenerateSheetNavigationBlock()
writeAllSheets()
generateHTMLHeader()
generateSheetData()
generateNavigation()
winFileToUrl()
generateStyles()
buildCSS()
generateHTMLFooter()
getImagesRoot()
setImagesRoot()
getEmbedImages()
setEmbedImages()
getUseInlineCss()
setUseInlineCss()
getUseEmbeddedCSS()
setUseEmbeddedCSS()
formatColor()
getIncludeCharts()
setIncludeCharts()
getPreCalculateFormulas()
setPreCalculateFormulas()
getUseDiskCaching()
setUseDiskCaching()
getDiskCachingDirectory()
openFileHandle()
No public properties found
VALIGN_ARR
HALIGN_ARR
BORDER_ARR
prepareForSave()
restoreStateAfterSave()
maybeCloseFileHandle()
createExternalWriterInstance()
$tempDir
$font
$orientation
$paperSize
$paperSizes
$spreadsheet
$isPdf
$includeCharts
$preCalculateFormulas
$fileHandle
N/A
mapVAlign()
mapHAlign()
mapBorderStyle()
generateMeta()
generateSheetPrep()
generateSheetStarts()
generateSheetTags()
extendRowsForCharts()
extendRowsForChartsAndImages()
writeImageInCell()
writeChartInCell()
getChartCaption()
buildCssRowHeights()
buildCssPerSheet()
createCSSStyle()
createCSSStyleAlignment()
createCSSStyleFont()
createCSSStyleBorders()
createCSSStyleBorder()
createCSSStyleFill()
generateTableTagInline()
generateTableTag()
generateTableHeader()
generateTableFooter()
generateRowStart()
generateRowCellCss()
generateRowCellDataValueRich()
generateRowCellDataValue()
generateRowCellData()
generateRowIncludeCharts()
generateRowSpans()
generateRowWriteCell()
generateRow()
assembleCSS()
calculateSpans()
calculateSpansOmitRows()
writeComment()
generatePageDeclarations()
$sheetIndex
$imagesRoot
$embedImages
$useInlineCss
$useEmbeddedCSS
$cssStyles
$columnWidths
$defaultFont
$spansAreCalculated
$isSpannedCell
$isBaseCell
$isSpannedRow
$generateSheetNavigationBlock
$editHtmlCallback
$useDiskCaching
$diskCachingDirectory
$shouldCloseFile
N/A

Constants

VALIGN_ARR

VALIGN_ARR = [\PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_BOTTOM => 'bottom', \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_TOP => 'top', \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_CENTER => 'middle', \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_JUSTIFY => 'middle']

HALIGN_ARR

HALIGN_ARR = [\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT => 'left', \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_RIGHT => 'right', \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER => 'center', \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER_CONTINUOUS => 'center', \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_JUSTIFY => 'justify']

BORDER_ARR

BORDER_ARR = [\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_NONE => 'none', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOT => '1px dashed', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOTDOT => '1px dotted', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHED => '1px dashed', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOTTED => '1px dotted', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOUBLE => '3px double', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_HAIR => '1px solid', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUM => '2px solid', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOT => '2px dashed', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOTDOT => '2px dotted', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_SLANTDASHDOT => '2px dashed', \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK => '3px solid']

Properties

$tempDir

$tempDir : string

Temporary storage directory.

Type

string

$font

$font : string

Font.

Type

string

$orientation

$orientation : string

Orientation (Over-ride).

Type

string

$paperSize

$paperSize : int

Paper size (Over-ride).

Type

int

$paperSizes

$paperSizes : array

Paper Sizes xRef List.

Type

array

$spreadsheet

$spreadsheet : \PhpOffice\PhpSpreadsheet\Spreadsheet

Spreadsheet object.

Type

Spreadsheet

$isPdf

$isPdf : bool

Is the current writer creating PDF?

Type

bool

$includeCharts

$includeCharts : bool

Write charts that are defined in the workbook? Identifies whether the Writer should write definitions for any charts that exist in the PhpSpreadsheet object;.

Type

bool

$preCalculateFormulas

$preCalculateFormulas : bool

Pre-calculate formulas Forces PhpSpreadsheet to recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file.

Type

bool

$fileHandle

$fileHandle : resource

Type

resource

$sheetIndex

$sheetIndex : int

Sheet index to write.

Type

int

$imagesRoot

$imagesRoot : string

Images root.

Type

string

$embedImages

$embedImages : bool

embed images, or link to images.

Type

bool

$useInlineCss

$useInlineCss : bool

Use inline CSS?

Type

bool

$useEmbeddedCSS

$useEmbeddedCSS : bool

Use embedded CSS?

Type

bool

$cssStyles

$cssStyles : array

Array of CSS styles.

Type

array

$columnWidths

$columnWidths : array

Array of column widths in points.

Type

array

$defaultFont

$defaultFont : \PhpOffice\PhpSpreadsheet\Style\Font

Default font.

Type

Font

$spansAreCalculated

$spansAreCalculated : bool

Flag whether spans have been calculated.

Type

bool

$isSpannedCell

$isSpannedCell : array

Excel cells that should not be written as HTML cells.

Type

array

$isBaseCell

$isBaseCell : array

Excel cells that are upper-left corner in a cell merge.

Type

array

$isSpannedRow

$isSpannedRow : array

Excel rows that should not be written as HTML rows.

Type

array

$generateSheetNavigationBlock

$generateSheetNavigationBlock : bool

Generate the Navigation block.

Type

bool

$editHtmlCallback

$editHtmlCallback : null|callable

Callback for editing generated html.

Type

null|callable

$useDiskCaching

$useDiskCaching : bool

Use disk caching where possible?

Type

bool

$diskCachingDirectory

$diskCachingDirectory : string

Disk caching directory.

Type

string

$shouldCloseFile

$shouldCloseFile : bool

Type

bool

Methods

__construct()

__construct(\PhpOffice\PhpSpreadsheet\Spreadsheet  $spreadsheet) : mixed

Create a new PDF Writer instance.

Parameters

\PhpOffice\PhpSpreadsheet\Spreadsheet $spreadsheet

Spreadsheet object

Returns

mixed —

getFont()

getFont() : string

Get Font.

Returns

string —

setFont()

setFont(string  $fontName) : $this

Set font. Examples: 'arialunicid0-chinese-simplified' 'arialunicid0-chinese-traditional' 'arialunicid0-korean' 'arialunicid0-japanese'.

Parameters

string $fontName

Returns

$this —

getPaperSize()

getPaperSize() : int

Get Paper Size.

Returns

int —

setPaperSize()

setPaperSize(string  $pValue) : self

Set Paper Size.

Parameters

string $pValue

Paper size see PageSetup::PAPERSIZE_*

Returns

self —

getOrientation()

getOrientation() : string

Get Orientation.

Returns

string —

setOrientation()

setOrientation(string  $pValue) : self

Set Orientation.

Parameters

string $pValue

Page orientation see PageSetup::ORIENTATION_*

Returns

self —

getTempDir()

getTempDir() : string

Get temporary storage directory.

Returns

string —

setTempDir()

setTempDir(string  $pValue) : self

Set temporary storage directory.

Parameters

string $pValue

Temporary storage directory

Returns

self —

save()

save(string  $pFilename) : void

Save Spreadsheet to file.

Parameters

string $pFilename

Name of the file to save as

generateHtmlAll()

generateHtmlAll() : string

Save Spreadsheet as html to variable.

Returns

string —

setEditHtmlCallback()

setEditHtmlCallback(?callable  $callback) : void

Set a callback to edit the entire HTML.

The callback must accept the HTML as string as first parameter, and it must return the edited HTML as string.

Parameters

?callable $callback

getSheetIndex()

getSheetIndex() : int

Get sheet index.

Returns

int —

setSheetIndex()

setSheetIndex(int  $pValue) : $this

Set sheet index.

Parameters

int $pValue

Sheet index

Returns

$this —

getGenerateSheetNavigationBlock()

getGenerateSheetNavigationBlock() : bool

Get sheet index.

Returns

bool —

setGenerateSheetNavigationBlock()

setGenerateSheetNavigationBlock(bool  $pValue) : $this

Set sheet index.

Parameters

bool $pValue

Flag indicating whether the sheet navigation block should be generated or not

Returns

$this —

writeAllSheets()

writeAllSheets() : $this

Write all sheets (resets sheetIndex to NULL).

Returns

$this —

generateHTMLHeader()

generateHTMLHeader(bool  $pIncludeStyles = false) : string

Generate HTML header.

Parameters

bool $pIncludeStyles

Include styles?

Returns

string —

generateSheetData()

generateSheetData() : string

Generate sheet data.

Returns

string —

generateNavigation()

generateNavigation() : string

Generate sheet tabs.

Returns

string —

winFileToUrl()

winFileToUrl(string  $filename) : string

Convert Windows file name to file protocol URL.

Parameters

string $filename

file name on local system

Returns

string —

generateStyles()

generateStyles(bool  $generateSurroundingHTML = true) : string

Generate CSS styles.

Parameters

bool $generateSurroundingHTML

Generate surrounding HTML tags? (<style> and </style>)

Returns

string —

buildCSS()

buildCSS(bool  $generateSurroundingHTML = true) : array

Build CSS styles.

Parameters

bool $generateSurroundingHTML

Generate surrounding HTML style? (html { })

Returns

array —

generateHTMLFooter()

generateHTMLFooter() : mixed

Generate HTML footer.

Returns

mixed —

getImagesRoot()

getImagesRoot() : string

Get images root.

Returns

string —

setImagesRoot()

setImagesRoot(string  $pValue) : $this

Set images root.

Parameters

string $pValue

Returns

$this —

getEmbedImages()

getEmbedImages() : bool

Get embed images.

Returns

bool —

setEmbedImages()

setEmbedImages(bool  $pValue) : $this

Set embed images.

Parameters

bool $pValue

Returns

$this —

getUseInlineCss()

getUseInlineCss() : bool

Get use inline CSS?

Returns

bool —

setUseInlineCss()

setUseInlineCss(bool  $pValue) : $this

Set use inline CSS?

Parameters

bool $pValue

Returns

$this —

getUseEmbeddedCSS()

getUseEmbeddedCSS() : bool

Get use embedded CSS?

Returns

bool —

setUseEmbeddedCSS()

setUseEmbeddedCSS(bool  $pValue) : $this

Set use embedded CSS?

Parameters

bool $pValue

Returns

$this —

formatColor()

formatColor(string  $pValue, string  $pFormat) : string

Add color to formatted string as inline style.

Parameters

string $pValue

Plain formatted value without color

string $pFormat

Format code

Returns

string —

getIncludeCharts()

getIncludeCharts() : bool

Write charts in workbook? If this is true, then the Writer will write definitions for any charts that exist in the PhpSpreadsheet object.

If false (the default) it will ignore any charts defined in the PhpSpreadsheet object.

Returns

bool —

setIncludeCharts()

setIncludeCharts(mixed  $pValue) : \PhpOffice\PhpSpreadsheet\Writer\IWriter

Set write charts in workbook Set to true, to advise the Writer to include any charts that exist in the PhpSpreadsheet object.

Set to false (the default) to ignore charts.

Parameters

mixed $pValue

Returns

\PhpOffice\PhpSpreadsheet\Writer\IWriter —

getPreCalculateFormulas()

getPreCalculateFormulas() : bool

Get Pre-Calculate Formulas flag If this is true (the default), then the writer will recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file If false, then formulae are not calculated on save. This is faster for saving in PhpSpreadsheet, but slower when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself.

Returns

bool —

setPreCalculateFormulas()

setPreCalculateFormulas(mixed  $pValue) : \PhpOffice\PhpSpreadsheet\Writer\IWriter

Set Pre-Calculate Formulas Set to true (the default) to advise the Writer to calculate all formulae on save Set to false to prevent precalculation of formulae on save.

Parameters

mixed $pValue

Pre-Calculate Formulas?

Returns

\PhpOffice\PhpSpreadsheet\Writer\IWriter —

getUseDiskCaching()

getUseDiskCaching() : bool

Get use disk caching where possible?

Returns

bool —

setUseDiskCaching()

setUseDiskCaching(mixed  $pValue, mixed  $pDirectory = null) : \PhpOffice\PhpSpreadsheet\Writer\IWriter

Set use disk caching where possible?

Parameters

mixed $pValue
mixed $pDirectory

Disk caching directory

Returns

\PhpOffice\PhpSpreadsheet\Writer\IWriter —

getDiskCachingDirectory()

getDiskCachingDirectory() : string

Get disk caching directory.

Returns

string —

openFileHandle()

openFileHandle(resource|string  $filename) : void

Open file handle.

Parameters

resource|string $filename

prepareForSave()

prepareForSave(string  $pFilename) : resource

Save Spreadsheet to PDF file, pre-save.

Parameters

string $pFilename

Name of the file to save as

Returns

resource —

restoreStateAfterSave()

restoreStateAfterSave() : void

Save PhpSpreadsheet to PDF file, post-save.

maybeCloseFileHandle()

maybeCloseFileHandle() : void

Close file handle only if we opened it ourselves.

createExternalWriterInstance()

createExternalWriterInstance(string  $orientation, string  $unit, array|string  $paperSize) : \TCPDF

Gets the implementation of external PDF library that should be used.

Parameters

string $orientation

Page orientation

string $unit

Unit measure

array|string $paperSize

Paper size

Returns

\TCPDF —

implementation

mapVAlign()

mapVAlign(string  $vAlign) : string

Map VAlign.

Parameters

string $vAlign

Vertical alignment

Returns

string —

mapHAlign()

mapHAlign(string  $hAlign) : string

Map HAlign.

Parameters

string $hAlign

Horizontal alignment

Returns

string —

mapBorderStyle()

mapBorderStyle(int  $borderStyle) : string

Map border style.

Parameters

int $borderStyle

Sheet index

Returns

string —

generateMeta()

generateMeta(mixed  $val, mixed  $desc) : mixed

Parameters

mixed $val
mixed $desc

Returns

mixed —

generateSheetPrep()

generateSheetPrep() : mixed

Returns

mixed —

generateSheetStarts()

generateSheetStarts(mixed  $sheet, mixed  $rowMin) : mixed

Parameters

mixed $sheet
mixed $rowMin

Returns

mixed —

generateSheetTags()

generateSheetTags(mixed  $row, mixed  $theadStart, mixed  $theadEnd, mixed  $tbodyStart) : mixed

Parameters

mixed $row
mixed $theadStart
mixed $theadEnd
mixed $tbodyStart

Returns

mixed —

extendRowsForCharts()

extendRowsForCharts(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, int  $row) : array

Extend Row if chart is placed after nominal end of row.

This code should be exercised by sample: Chart/32_Chart_read_write_PDF.php. However, that test is suppressed due to out-of-date Jpgraph code issuing warnings. So, don't measure code coverage for this function till that is fixed.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

int $row

Row to check for charts

Returns

array —

extendRowsForChartsAndImages()

extendRowsForChartsAndImages(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, int  $row) : string

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet
int $row

Returns

string —

writeImageInCell()

writeImageInCell(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, string  $coordinates) : string

Generate image tag in cell.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

string $coordinates

Cell coordinates

Returns

string —

writeChartInCell()

writeChartInCell(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, string  $coordinates) : string

Generate chart tag in cell.

This code should be exercised by sample: Chart/32_Chart_read_write_PDF.php. However, that test is suppressed due to out-of-date Jpgraph code issuing warnings. So, don't measure code coverage for this function till that is fixed.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

string $coordinates

Cell coordinates

Returns

string —

getChartCaption()

getChartCaption(mixed  $cap) : string

Extend Row if chart is placed after nominal end of row.

This code should be exercised by sample: Chart/32_Chart_read_write_PDF.php. However, that test is suppressed due to out-of-date Jpgraph code issuing warnings. So, don't measure code coverage for this function till that is fixed. Caption is described in documentation as fixed, but in 32_Chart it is somehow an array of RichText.

Parameters

mixed $cap

Returns

string —

buildCssRowHeights()

buildCssRowHeights(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $sheet, array  $css, int  $sheetIndex) : void

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $sheet
array $css
int $sheetIndex

buildCssPerSheet()

buildCssPerSheet(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $sheet, array  $css) : void

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $sheet
array $css

createCSSStyle()

createCSSStyle(\PhpOffice\PhpSpreadsheet\Style\Style  $pStyle) : array

Create CSS style.

Parameters

\PhpOffice\PhpSpreadsheet\Style\Style $pStyle

Returns

array —

createCSSStyleAlignment()

createCSSStyleAlignment(\PhpOffice\PhpSpreadsheet\Style\Alignment  $pStyle) : array

Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Alignment).

Parameters

\PhpOffice\PhpSpreadsheet\Style\Alignment $pStyle

\PhpOffice\PhpSpreadsheet\Style\Alignment

Returns

array —

createCSSStyleFont()

createCSSStyleFont(\PhpOffice\PhpSpreadsheet\Style\Font  $pStyle) : array

Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Font).

Parameters

\PhpOffice\PhpSpreadsheet\Style\Font $pStyle

Returns

array —

createCSSStyleBorders()

createCSSStyleBorders(\PhpOffice\PhpSpreadsheet\Style\Borders  $pStyle) : array

Create CSS style (Borders).

Parameters

\PhpOffice\PhpSpreadsheet\Style\Borders $pStyle

Borders

Returns

array —

createCSSStyleBorder()

createCSSStyleBorder(\PhpOffice\PhpSpreadsheet\Style\Border  $pStyle) : string

Create CSS style (Border).

Parameters

\PhpOffice\PhpSpreadsheet\Style\Border $pStyle

Border

Returns

string —

createCSSStyleFill()

createCSSStyleFill(\PhpOffice\PhpSpreadsheet\Style\Fill  $pStyle) : array

Create CSS style (Fill).

Parameters

\PhpOffice\PhpSpreadsheet\Style\Fill $pStyle

Fill

Returns

array —

generateTableTagInline()

generateTableTagInline(mixed  $pSheet, mixed  $id) : mixed

Parameters

mixed $pSheet
mixed $id

Returns

mixed —

generateTableTag()

generateTableTag(mixed  $pSheet, mixed  $id, mixed  $html, mixed  $sheetIndex) : void

Parameters

mixed $pSheet
mixed $id
mixed $html
mixed $sheetIndex

generateTableHeader()

generateTableHeader(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, bool  $showid = true) : string

Generate table header.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet

The worksheet for the table we are writing

bool $showid

whether or not to add id to table tag

Returns

string —

generateTableFooter()

generateTableFooter() : mixed

Generate table footer.

Returns

mixed —

generateRowStart()

generateRowStart(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, int  $sheetIndex, int  $pRow) : string

Generate row start.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

int $sheetIndex

Sheet index (0-based)

int $pRow

row number

Returns

string —

generateRowCellCss()

generateRowCellCss(mixed  $pSheet, mixed  $cellAddress, mixed  $pRow, mixed  $colNum) : mixed

Parameters

mixed $pSheet
mixed $cellAddress
mixed $pRow
mixed $colNum

Returns

mixed —

generateRowCellDataValueRich()

generateRowCellDataValueRich(mixed  $cell, mixed  $cellData) : void

Parameters

mixed $cell
mixed $cellData

generateRowCellDataValue()

generateRowCellDataValue(mixed  $pSheet, mixed  $cell, mixed  $cellData) : void

Parameters

mixed $pSheet
mixed $cell
mixed $cellData

generateRowCellData()

generateRowCellData(mixed  $pSheet, mixed  $cell, mixed  $cssClass, mixed  $cellType) : mixed

Parameters

mixed $pSheet
mixed $cell
mixed $cssClass
mixed $cellType

Returns

mixed —

generateRowIncludeCharts()

generateRowIncludeCharts(mixed  $pSheet, mixed  $coordinate) : mixed

Parameters

mixed $pSheet
mixed $coordinate

Returns

mixed —

generateRowSpans()

generateRowSpans(mixed  $html, mixed  $rowSpan, mixed  $colSpan) : mixed

Parameters

mixed $html
mixed $rowSpan
mixed $colSpan

Returns

mixed —

generateRowWriteCell()

generateRowWriteCell(mixed  $html, mixed  $pSheet, mixed  $coordinate, mixed  $cellType, mixed  $cellData, mixed  $colSpan, mixed  $rowSpan, mixed  $cssClass, mixed  $colNum, mixed  $sheetIndex, mixed  $pRow) : void

Parameters

mixed $html
mixed $pSheet
mixed $coordinate
mixed $cellType
mixed $cellData
mixed $colSpan
mixed $rowSpan
mixed $cssClass
mixed $colNum
mixed $sheetIndex
mixed $pRow

generateRow()

generateRow(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, array  $pValues, int  $pRow, string  $cellType) : string

Generate row.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

array $pValues

Array containing cells in a row

int $pRow

Row number (0-based)

string $cellType

eg: 'td'

Returns

string —

assembleCSS()

assembleCSS(array  $pValue = []) : string

Takes array where of CSS properties / values and converts to CSS string.

Parameters

array $pValue

Returns

string —

calculateSpans()

calculateSpans() : void

Calculate information about HTML colspan and rowspan which is not always the same as Excel's.

calculateSpansOmitRows()

calculateSpansOmitRows(mixed  $sheet, mixed  $sheetIndex, mixed  $candidateSpannedRow) : void

Parameters

mixed $sheet
mixed $sheetIndex
mixed $candidateSpannedRow

writeComment()

writeComment(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pSheet, string  $coordinate) : string

Write a comment in the same format as LibreOffice.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet
string $coordinate

Returns

string —

generatePageDeclarations()

generatePageDeclarations(bool  $generateSurroundingHTML) : string

Generate @page declarations.

Parameters

bool $generateSurroundingHTML

Returns

string —