Constants and Types
ExcelTableKit exposes a small set of constants and type aliases that are used
throughout the library. They are importable directly from
exceltablekit.constants.
from exceltablekit.constants import BorderStyle, COLUMN_MAX, ROW_MAX
BorderStyle
- exceltablekit.constants.BorderStyle
A
Literaltype alias listing the 13 border styles supported by Excel (and openpyxl). Used as the type for all*_styleparameters inset_border()andset_header_border().from exceltablekit.constants import BorderStyle
Accepted values:
Value
Description
"thin"Thin solid line (default for all border methods)
"medium"Medium-weight solid line
"thick"Thick solid line
"double"Two parallel thin lines
"hair"Hairline — thinnest visible line
"dashed"Short dashes
"dotted"Dots
"dashDot"Alternating dash–dot pattern
"dashDotDot"Alternating dash–dot–dot pattern
"mediumDashed"Medium-weight dashes
"mediumDashDot"Medium-weight dash–dot
"mediumDashDotDot"Medium-weight dash–dot–dot
"slantDashDot"Slanted dash–dot pattern
Excel grid limits
- exceltablekit.constants.COLUMN_MAX
- Type:
- Value:
16384
Maximum column index in Excel, corresponding to column
XFD. Column values that exceed this limit raiseColumnOutOfBoundsError.
- exceltablekit.constants.ROW_MAX
- Type:
- Value:
1048576
Maximum row index in Excel. Row values that exceed this limit raise
InvalidRowValueError.
Alphabet lookup tables
These dictionaries are used internally by the
Alphabet utility and are exported
for completeness. Direct use is rarely needed.
- exceltablekit.constants.STRING_ALPHABET
-
Maps each uppercase letter
"A"–"Z"to its 1-based column index (1–26).from exceltablekit.constants import STRING_ALPHABET STRING_ALPHABET["A"] # 1 STRING_ALPHABET["Z"] # 26