openpyxl.utils.units
paper-xlsx 0.2.1 API reference
BASE_COL_WIDTH
attributeBASE_COL_WIDTH= 8DEFAULT_COLUMN_WIDTH
attributeDEFAULT_COLUMN_WIDTH= BASE_COL_WIDTH + 5DEFAULT_HEADER
attributeDEFAULT_HEADER= 0.3From the ECMA Spec (4th Edition part 1) Page setup: "Left Page Margin in inches" p. 1647
See also http://msdn.microsoft.com/en-us/library/dd560821(v=office.12).aspx
dxa: The main unit in OOXML is a twentieth of a point. Also called twips. pt: point. In Excel there are 72 points to an inch hp: half-points are used to specify font sizes. A font-size of 12pt equals 24 half points pct: Half-points are used to specify font sizes. A font-size of 12pt equals 24 half points
EMU: English Metric Unit, EMUs are used for coordinates in vector-based drawings and embedded pictures. One inch equates to 914400 EMUs and a centimeter is 360000. For bitmaps the default resolution is 96 dpi (known as PixelsPerInch in Excel). Spec p. 1122
For radial geometry Excel uses integer units of 1/60000th of a degree.
DEFAULT_LEFT_MARGIN
attributeDEFAULT_LEFT_MARGIN= 0.7DEFAULT_ROW_HEIGHT
attributeDEFAULT_ROW_HEIGHT= 15.0DEFAULT_TOP_MARGIN
attributeDEFAULT_TOP_MARGIN= 0.7874EMU_to_cm
funcEMU_to_cm(value)paramvalueEMU_to_inch
funcEMU_to_inch(value)paramvalueEMU_to_pixels
funcEMU_to_pixels(value)paramvalueangle_to_degrees
funcangle_to_degrees(value)paramvaluecm_to_EMU
funccm_to_EMU(value)1 cm = 360000 EMUs
paramvaluecm_to_dxa
funccm_to_dxa(value)paramvaluedegrees_to_angle
funcdegrees_to_angle(value)1 degree = 60000 angles
paramvaluedxa_to_cm
funcdxa_to_cm(value)paramvaluedxa_to_inch
funcdxa_to_inch(value)paramvalueinch_to_EMU
funcinch_to_EMU(value)1 inch = 914400 EMUs
paramvalueinch_to_dxa
funcinch_to_dxa(value)1 inch = 72 * 20 dxa
paramvaluepixels_to_EMU
funcpixels_to_EMU(value)1 pixel = 9525 EMUs
paramvaluepixels_to_points
funcpixels_to_points(value, dpi=96)96 dpi, 72i
paramvalueparamdpi= 96points_to_pixels
funcpoints_to_pixels(value, dpi=96)paramvalueparamdpi= 96short_color
funcshort_color(color)format a color to its short size
paramcolor