Paper Office
paper-xlsxAPI referenceutils.units

openpyxl.utils.units

paper-xlsx 0.2.1 API reference

BASE_COL_WIDTH

attributeBASE_COL_WIDTH
= 8

DEFAULT_COLUMN_WIDTH

attributeDEFAULT_COLUMN_WIDTH
= BASE_COL_WIDTH + 5

DEFAULT_HEADER

attributeDEFAULT_HEADER
= 0.3

From the ECMA Spec (4th Edition part 1) Page setup: "Left Page Margin in inches" p. 1647

Docs from http://startbigthinksmall.wordpress.com/2010/01/04/points-inches-and-emus-measuring-units-in-office-open-xml/

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.7

DEFAULT_ROW_HEIGHT

attributeDEFAULT_ROW_HEIGHT
= 15.0

DEFAULT_TOP_MARGIN

attributeDEFAULT_TOP_MARGIN
= 0.7874

EMU_to_cm

funcEMU_to_cm(value)
paramvalue

EMU_to_inch

funcEMU_to_inch(value)
paramvalue

EMU_to_pixels

funcEMU_to_pixels(value)
paramvalue

angle_to_degrees

funcangle_to_degrees(value)
paramvalue

cm_to_EMU

funccm_to_EMU(value)

1 cm = 360000 EMUs

paramvalue

cm_to_dxa

funccm_to_dxa(value)
paramvalue

degrees_to_angle

funcdegrees_to_angle(value)

1 degree = 60000 angles

paramvalue

dxa_to_cm

funcdxa_to_cm(value)
paramvalue

dxa_to_inch

funcdxa_to_inch(value)
paramvalue

inch_to_EMU

funcinch_to_EMU(value)

1 inch = 914400 EMUs

paramvalue

inch_to_dxa

funcinch_to_dxa(value)

1 inch = 72 * 20 dxa

paramvalue

pixels_to_EMU

funcpixels_to_EMU(value)

1 pixel = 9525 EMUs

paramvalue

pixels_to_points

funcpixels_to_points(value, dpi=96)

96 dpi, 72i

paramvalue
paramdpi
= 96

points_to_pixels

funcpoints_to_pixels(value, dpi=96)
paramvalue
paramdpi
= 96

short_color

funcshort_color(color)

format a color to its short size

paramcolor

On this page