AUTOSIZE_METHOD_APPROX
AUTOSIZE_METHOD_APPROX = 'approx'
PHPExcel_Shared_Font
calculateColumnWidth(\PHPExcel_Style_Font $font, \PHPExcel_RichText|string $cellText = '', integer $rotation, \PHPExcel_Style_Font|NULL $defaultFont = null) : integer
Calculate an (approximate) OpenXML column width, based on font size and text contained
\PHPExcel_Style_Font | $font | Font object |
\PHPExcel_RichText|string | $cellText | Text to calculate width |
integer | $rotation | Rotation angle |
\PHPExcel_Style_Font|NULL | $defaultFont | Font object |
Column width
getTextWidthPixelsExact(string $text, \PHPExcel_Style_Font $font, integer $rotation) : integer
Get GD text width in pixels for a string of text in a certain font at a certain rotation angle
string | $text | |
\PHPExcel_Style_Font | $font | |
integer | $rotation |
getTextWidthPixelsApprox(string $columnText, \PHPExcel_Style_Font $font = null, integer $rotation) : integer
Get approximate width in pixels for a string of text in a certain font at a certain rotation angle
string | $columnText | |
\PHPExcel_Style_Font | $font | |
integer | $rotation |
Text width in pixels (no padding added)
getDefaultColumnWidthByFont(\PHPExcel_Style_Font $font, boolean $pPixels = false) : mixed
Get the effective column width for columns without a column dimension or column with width -1 For example, for Calibri 11 this is 9.140625 (64 px)
\PHPExcel_Style_Font | $font | The workbooks default font |
boolean | $pPixels | true = return column width in pixels, false = return in OOXML units |
Column width
getDefaultRowHeightByFont(\PHPExcel_Style_Font $font) : float
Get the effective row height for rows without a row dimension or rows with height -1 For example, for Calibri 11 this is 15 points
\PHPExcel_Style_Font | $font | The workbooks default font |
Row height in points