pixelsToEMU()
pixelsToEMU(integer $pValue) : integer
Convert pixels to EMU.
Parameters
integer | $pValue | Value in pixels |
Returns
integer —Value in EMU
pixelsToCellDimension(integer $pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont) : integer
Convert pixels to column width. Exact algorithm not known.
By inspection of a real Excel file using Calibri 11, one finds 1000px ~ 142.85546875 This gives a conversion factor of 7. Also, we assume that pixels and font size are proportional.
integer | $pValue | Value in pixels |
\PhpOffice\PhpSpreadsheet\Style\Font | $pDefaultFont | Default font of the workbook |
Value in cell dimension
cellDimensionToPixels(float $pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont) : integer
Convert column width from (intrinsic) Excel units to pixels.
float | $pValue | Value in cell dimension |
\PhpOffice\PhpSpreadsheet\Style\Font | $pDefaultFont | Default font of the workbook |
Value in pixels