# openpyxl - A Python library to read/write Excel 2010 xlsx/xlsm files

Author: | Eric Gazoni, Charlie Clark
Source code: | https://foss.heptapod.net/openpyxl/openpyxl
Issues: | https://foss.heptapod.net/openpyxl/openpyxl/-/issues
Generated: | May 24, 2022
License: | MIT/Expat
Version: | 3.0.10

## Introduction

openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.

It was born from lack of existing library to read/write natively from Python the Office Open XML format.

All kudos to the PHPExcel team as openpyxl was initially based on PHPExcel.

## Security

By default openpyxl does not guard against quadratic blowup or billion laughs xml attacks. To guard against these attacks install defusedxml.

## Mailing List

The user list can be found on http://groups.google.com/group/openpyxl-users

Sample code:

    from openpyxl import Workbook
    wb = Workbook()

    # grab the active worksheet
    ws = wb.active

    # Data can be assigned directly to cells
    ws['A1'] = 42

    # Rows can also be appended
    ws.append([1, 2, 3])

    # Python types will automatically be converted
    import datetime
    ws['A2'] = datetime.datetime.now()

    # Save the file
    wb.save("sample.xlsx")

## Documentation

The documentation is at: https://openpyxl.readthedocs.io

- installation methods
- code examples
- instructions for contributing

Release notes: https://openpyxl.readthedocs.io/en/stable/changes.html

## Support

This is an open source project, maintained by volunteers in their spare time. This may well mean that particular features or functions that you would like are missing. But things don’t have to stay that way. You can contribute the project Development yourself or contract a developer for particular features.

Professional support for openpyxl is available from Clark Consulting & Research and Adimian. Donations to the project to support further development and maintenance are welcome.

Bug reports and feature requests should be submitted using the issue tracker. Please provide a full traceback of any error you see and if possible a sample file. If for reasons of confidentiality you are unable to make a file publicly available then contact of one the developers.

The repository is being provided by Octobus and Clever Cloud.

## How to Contribute

Any help will be greatly appreciated, just follow those steps:

> 1. Please join the group and create a branch (https://foss.heptapod.net/openpyxl/openpyxl/) and follow the Merge Request Start Guide. for each independent feature, don’t try to fix all problems at the same time, it’s easier for those who will review and merge your changes ;-)

> 2. Hack hack hack

> 3. Don’t forget to add unit tests for your changes! (YES, even if it’s a one-liner, changes without tests will not be accepted.) There are plenty of examples in the source if you lack know-how or inspiration.

> 4. If you added a whole new feature, or just improved something, you can be proud of it, so add yourself to the AUTHORS file :-)

> 5. Let people know about the shiny thing you just implemented, update the docs!

> 6. When it’s done, just issue a pull request (click on the large “pull request” button on your repository) and wait for your code to be reviewed, and, if you followed all theses steps, merged into the main repository.

For further information see Development

### Other ways to help

There are several ways to contribute, even if you can’t code (or can’t code well):

> - triaging bugs on the bug tracker: closing bugs that have already been closed, are not relevant, cannot be reproduced, …
> - updating documentation in virtually every area: many large features have been added (mainly about charts and images at the moment) but without any documentation, it’s pretty hard to do anything with it
> - proposing compatibility fixes for different versions of Python: we support 3.6, 3.7, 3.8 and 3.9.

## Installation

Install openpyxl using pip. It is advisable to do this in a Python virtualenv without system packages:

    $ pip install openpyxl

Note

There is support for the popular lxml library which will be used if it is installed. This is particular useful when creating large files.

Warning

To be able to include images (jpeg, png, bmp,…) into an openpyxl file, you will also need the “pillow” library that can be installed with:

    $ pip install pillow

or browse https://pypi.python.org/pypi/Pillow/, pick the latest version and head to the bottom of the page for Windows binaries.

### Working with a checkout

Sometimes you might want to work with the checkout of a particular version. This may be the case if bugs have been fixed but a release has not yet been made.

    $ pip install -e hg+https://foss.heptapod.net/openpyxl/openpyxl/@3.0#egg=openpyxl

## Usage examples

### Tutorial

##### Create a workbook

There is no need to create a file on the filesystem to get started with openpyxl. Just import the `Workbook` class and start work:

    >>> from openpyxl import Workbook
    >>> wb = Workbook()

A workbook is always created with at least one worksheet. You can get it by using the `Workbook.active` property:

    >>> ws = wb.active

Note

This is set to 0 by default. Unless you modify its value, you will always get the first worksheet by using this method.

You can create new worksheets using the `Workbook.create_sheet()` method:

    >>> ws1 = wb.create_sheet("Mysheet") # insert at the end (default)
    # or
    >>> ws2 = wb.create_sheet("Mysheet", 0) # insert at first position
    # or
    >>> ws3 = wb.create_sheet("Mysheet", -1) # insert at the penultimate position

Sheets are given a name automatically when they are created. They are numbered in sequence (Sheet, Sheet1, Sheet2, …). You can change this name at any time with the `Worksheet.title` property:

    ws.title = "New Title"

The background color of the tab holding this title is white by default. You can change this providing an `RRGGBB` color code to the `Worksheet.sheet_properties.tabColor` attribute:

    ws.sheet_properties.tabColor = "1072BA"

Once you gave a worksheet a name, you can get it as a key of the workbook:

    >>> ws3 = wb["New Title"]

You can review the names of all worksheets of the workbook with the `Workbook.sheetname` attribute

    >>> print(wb.sheetnames)
    ['Sheet2', 'New Title', 'Sheet1']

You can loop through worksheets

    >>> for sheet in wb:
    ...     print(sheet.title)

You can create copies of worksheets within a single workbook:

`Workbook.copy_worksheet()` method:

    >>> source = wb.active
    >>> target = wb.copy_worksheet(source)

Note

Only cells (including values, styles, hyperlinks and comments) and certain worksheet attribues (including dimensions, format and properties) are copied. All other workbook / worksheet attributes are not copied - e.g. Images, Charts.

You also cannot copy worksheets between workbooks. You cannot copy a worksheet if the workbook is open in read-only or write-only mode.

##### Playing with data

###### Accessing one cell

Now we know how to get a worksheet, we can start modifying cells content. Cells can be accessed directly as keys of the worksheet:

    >>> c = ws['A4']

This will return the cell at A4, or create one if it does not exist yet. Values can be directly assigned:

    >>> ws['A4'] = 4

There is also the `Worksheet.cell()` method.

This provides access to cells using row and column notation:

    >>> d = ws.cell(row=4, column=2, value=10)

Note

When a worksheet is created in memory, it contains no cells. They are created when first accessed.

Warning

Because of this feature, scrolling through cells instead of accessing them directly will create them all in memory, even if you don’t assign them a value.

Something like

    >>> for x in range(1,101):
    ...        for y in range(1,101):
    ...            ws.cell(row=x, column=y)

will create 100x100 cells in memory, for nothing.

###### Accessing many cells

Ranges of cells can be accessed using slicing:

    >>> cell_range = ws['A1':'C2']

Ranges of rows or columns can be obtained similarly:

    >>> colC = ws['C']
    >>> col_range = ws['C:D']
    >>> row10 = ws[10]
    >>> row_range = ws[5:10]

You can also use the `Worksheet.iter_rows()` method:

    >>> for row in ws.iter_rows(min_row=1, max_col=3, max_row=2):
    ...    for cell in row:
    ...        print(cell)
    <Cell Sheet1.A1>
    <Cell Sheet1.B1>
    <Cell Sheet1.C1>
    <Cell Sheet1.A2>
    <Cell Sheet1.B2>
    <Cell Sheet1.C2>

Likewise the `Worksheet.iter_cols()` method will return columns:

    >>> for col in ws.iter_cols(min_row=1, max_col=3, max_row=2):
    ...     for cell in col:
    ...         print(cell)
    <Cell Sheet1.A1>
    <Cell Sheet1.A2>
    <Cell Sheet1.B1>
    <Cell Sheet1.B2>
    <Cell Sheet1.C1>
    <Cell Sheet1.C2>

Note

For performance reasons the `Worksheet.iter_cols()` method is not available in read-only mode.

If you need to iterate through all the rows or columns of a file, you can instead use the `Worksheet.rows` property:

    >>> ws = wb.active
    >>> ws['C9'] = 'hello world'
    >>> tuple(ws.rows)
    ((<Cell Sheet.A1>, <Cell Sheet.B1>, <Cell Sheet.C1>),
    (<Cell Sheet.A2>, <Cell Sheet.B2>, <Cell Sheet.C2>),
    (<Cell Sheet.A3>, <Cell Sheet.B3>, <Cell Sheet.C3>),
    (<Cell Sheet.A4>, <Cell Sheet.B4>, <Cell Sheet.C4>),
    (<Cell Sheet.A5>, <Cell Sheet.B5>, <Cell Sheet.C5>),
    (<Cell Sheet.A6>, <Cell Sheet.B6>, <Cell Sheet.C6>),
    (<Cell Sheet.A7>, <Cell Sheet.B7>, <Cell Sheet.C7>),
    (<Cell Sheet.A8>, <Cell Sheet.B8>, <Cell Sheet.C8>),
    (<Cell Sheet.A9>, <Cell Sheet.B9>, <Cell Sheet.C9>))

or the `Worksheet.columns` property:

    >>> tuple(ws.columns)
    ((<Cell Sheet.A1>,
    <Cell Sheet.A2>,
    <Cell Sheet.A3>,
    <Cell Sheet.A4>,
    <Cell Sheet.A5>,
    <Cell Sheet.A6>,
    ...
    <Cell Sheet.B7>,
    <Cell Sheet.B8>,
    <Cell Sheet.B9>),
    (<Cell Sheet.C1>,
    <Cell Sheet.C2>,
    <Cell Sheet.C3>,
    <Cell Sheet.C4>,
    <Cell Sheet.C5>,
    <Cell Sheet.C6>,
    <Cell Sheet.C7>,
    <Cell Sheet.C8>,
    <Cell Sheet.C9>))

Note

For performance reasons the `Worksheet.columns` property is not available in read-only mode.

###### Values only

If you just want the values from a worksheet you can use the `Worksheet.values` property. This iterates over all the rows in a worksheet but returns just the cell values:

    for row in ws.values:
       for value in row:
         print(value)

Both `Worksheet.iter_rows()` and `Worksheet.iter_cols()` can take the `values_only` parameter to return just the cell’s value:

    >>> for row in ws.iter_rows(min_row=1, max_col=3, max_row=2, values_only=True):
    ...   print(row)

    (None, None, None)
    (None, None, None)

##### Data storage

Once we have a `Cell`, we can assign it a value:

    >>> c.value = 'hello, world'
    >>> print(c.value)
    'hello, world'

    >>> d.value = 3.14
    >>> print(d.value)
    3.14

###### Saving to a file

The simplest and safest way to save a workbook is by using the `Workbook.save()` method of the `Workbook` object:

    >>> wb = Workbook()
    >>> wb.save('balances.xlsx')

Warning

This operation will overwrite existing files without warning.

Note

The filename extension is not forced to be xlsx or xlsm, although you might have some trouble opening it directly with another application if you don’t use an official extension.

As OOXML files are basically ZIP files, you can also open it with your favourite ZIP archive manager.

###### Saving as a stream

If you want to save the file to a stream, e.g. when using a web application such as Pyramid, Flask or Django then you can simply provide a `NamedTemporaryFile()`:

    >>> from tempfile import NamedTemporaryFile
    >>> from openpyxl import Workbook
    >>> wb = Workbook()
    >>> with NamedTemporaryFile() as tmp:
            wb.save(tmp.name)
            tmp.seek(0)
            stream = tmp.read()

You can specify the attribute template=True, to save a workbook as a template:

    >>> wb = load_workbook('document.xlsx')
    >>> wb.template = True
    >>> wb.save('document_template.xltx')

or set this attribute to False (default), to save as a document:

    >>> wb = load_workbook('document_template.xltx')
    >>> wb.template = False
    >>> wb.save('document.xlsx', as_template=False)

Warning

You should monitor the data attributes and document extensions for saving documents in the document templates and vice versa, otherwise the result table engine can not open the document.

Note

The following will fail:

    >>> wb = load_workbook('document.xlsx')
    >>> # Need to save with the extension *.xlsx
    >>> wb.save('new_document.xlsm')
    >>> # MS Excel can't open the document
    >>>
    >>> # or
    >>>
    >>> # Need specify attribute keep_vba=True
    >>> wb = load_workbook('document.xlsm')
    >>> wb.save('new_document.xlsm')
    >>> # MS Excel will not open the document
    >>>
    >>> # or
    >>>
    >>> wb = load_workbook('document.xltm', keep_vba=True)
    >>> # If we need a template document, then we must specify extension as *.xltm.
    >>> wb.save('new_document.xlsm')
    >>> # MS Excel will not open the document

##### Loading from a file

The same way as writing, you can use the `openpyxl.load_workbook()` to open an existing workbook:

    >>> from openpyxl import load_workbook
    >>> wb2 = load_workbook('test.xlsx')
    >>> print(wb2.sheetnames)
    ['Sheet2', 'New Title', 'Sheet1']

This ends the tutorial for now, you can proceed to the Simple usage section

### Cookbook

#### Simple usage

##### Write a workbook

    >>> from openpyxl import Workbook
    >>> from openpyxl.utils import get_column_letter
    >>>
    >>> wb = Workbook()
    >>>
    >>> dest_filename = 'empty_book.xlsx'
    >>>
    >>> ws1 = wb.active
    >>> ws1.title = "range names"
    >>>
    >>> for row in range(1, 40):
    ...     ws1.append(range(600))
    >>>
    >>> ws2 = wb.create_sheet(title="Pi")
    >>>
    >>> ws2['F5'] = 3.14
    >>>
    >>> ws3 = wb.create_sheet(title="Data")
    >>> for row in range(10, 20):
    ...     for col in range(27, 54):
    ...         _ = ws3.cell(column=col, row=row, value="{0}".format(get_column_letter(col)))
    >>> print(ws3['AA10'].value)
    AA
    >>> wb.save(filename = dest_filename)

##### Read an existing workbook

    >>> from openpyxl import load_workbook
    >>> wb = load_workbook(filename = 'empty_book.xlsx')
    >>> sheet_ranges = wb['range names']
    >>> print(sheet_ranges['D18'].value)
    3

Note

There are several flags that can be used in load_workbook.

- data_only controls whether cells with formulae have either the formula (default) or the value stored the last time Excel read the sheet.
- keep_vba controls whether any Visual Basic elements are preserved or not (default). If they are preserved they are still not editable.

Warning

openpyxl does currently not read all possible items in an Excel file so images and charts will be lost from existing files if they are opened and saved with the same name.

##### Using number formats

    >>> import datetime
    >>> from openpyxl import Workbook
    >>> wb = Workbook()
    >>> ws = wb.active
    >>> # set date using a Python datetime
    >>> ws['A1'] = datetime.datetime(2010, 7, 21)
    >>>
    >>> ws['A1'].number_format
    'yyyy-mm-dd h:mm:ss'

##### Using formulae

    >>> from openpyxl import Workbook
    >>> wb = Workbook()
    >>> ws = wb.active
    >>> # add a simple formula
    >>> ws["A1"] = "=SUM(1, 1)"
    >>> wb.save("formula.xlsx")

Warning

NB you must use the English name for a function and function arguments must be separated by commas and not other punctuation such as semi-colons.

openpyxl never evaluates formula but it is possible to check the name of a formula:

    >>> from openpyxl.utils import FORMULAE
    >>> "HEX2DEC" in FORMULAE
    True

If you’re trying to use a formula that isn’t known this could be because you’re using a formula that was not included in the initial specification. Such formulae must be prefixed with _xlfn. to work.

##### Merge / Unmerge cells

When you merge cells all cells but the top-left one are removed from the worksheet. To carry the border-information of the merged cell, the boundary cells of the merged cell are created as MergeCells which always have the value None. See Styling Merged Cells for information on formatting merged cells.

    >>> from openpyxl.workbook import Workbook
    >>>
    >>> wb = Workbook()
    >>> ws = wb.active
    >>>
    >>> ws.merge_cells('A2:D2')
    >>> ws.unmerge_cells('A2:D2')
    >>>
    >>> # or equivalently
    >>> ws.merge_cells(start_row=2, start_column=1, end_row=4, end_column=4)
    >>> ws.unmerge_cells(start_row=2, start_column=1, end_row=4, end_column=4)

##### Inserting an image

    >>> from openpyxl import Workbook
    >>> from openpyxl.drawing.image import Image
    >>>
    >>> wb = Workbook()
    >>> ws = wb.active
    >>> ws['A1'] = 'You should see three logos below'

    >>> # create an image
    >>> img = Image('logo.png')

    >>> # add to worksheet and anchor next to cells
    >>> ws.add_image(img, 'A1')
    >>> wb.save('logo.xlsx')

##### Fold (outline)

    >>> import openpyxl
    >>> wb = openpyxl.Workbook()
    >>> ws = wb.create_sheet()
    >>> ws.column_dimensions.group('A','D', hidden=True)
    >>> ws.row_dimensions.group(1,10, hidden=True)
    >>> wb.save('group.xlsx')

## Performance

openpyxl attempts to balance functionality and performance. Where in doubt, we have focused on functionality over optimisation: performance tweaks are easier once an API has been established. Memory use is fairly high in comparison with other libraries and applications and is approximately 50 times the original file size, e.g. 2.5 GB for a 50 MB Excel file. As many use cases involve either only reading or writing files, the Optimised Modes modes mean this is less of a problem.

#### Benchmarks

All benchmarks are synthetic and extremely dependent upon the hardware but they can nevertheless give an indication.

##### Write Performance

The benchmark code can be adjusted to use more sheets and adjust the proportion of data that is strings. Because the version of Python being used can also significantly affect performance, a driver script can also be used to test with different Python versions with a tox environment.

Performance is compared with the excellent alternative library xlsxwriter

    Versions:
    python: 3.6.9
    openpyxl: 3.0.1
    xlsxwriter: 1.2.5

    Dimensions:
        Rows = 1000
        Cols = 50
        Sheets = 1
        Proportion text = 0.10

    Times:
        xlsxwriter            :   0.59
        xlsxwriter (optimised):   0.54
        openpyxl              :   0.73
        openpyxl (optimised)  :   0.61

    Versions:
    python: 3.7.5
    openpyxl: 3.0.1
    xlsxwriter: 1.2.5

    Dimensions:
        Rows = 1000
        Cols = 50
        Sheets = 1
        Proportion text = 0.10

    Times:
        xlsxwriter            :   0.65
        xlsxwriter (optimised):   0.53
        openpyxl              :   0.70
        openpyxl (optimised)  :   0.63

    Versions:
    python: 3.8.0
    openpyxl: 3.0.1
    xlsxwriter: 1.2.5

    Dimensions:
        Rows = 1000
        Cols = 50
        Sheets = 1
        Proportion text = 0.10

    Times:
        xlsxwriter            :   0.54
        xlsxwriter (optimised):   0.50
        openpyxl              :   1.10
        openpyxl (optimised)  :   0.57

##### Read Performance

Performance is measured using a file provided with a previous bug report and compared with the older xlrd library. xlrd is primarily for the older BIFF file format of .XLS files but it does have limited support for XLSX.

The code for the benchmark shows the importance of choosing the right options when working with a file. In this case disabling external links stops openpyxl opening cached copies of the linked worksheets.

One major difference between the libraries is that openpyxl’s read-only mode opens a workbook almost immediately making it suitable for multiple processes, this also readuces memory use significantly. xlrd does also not automatically convert dates and times into Python datetimes, though it does annotate cells accordingly but to do this in client code significantly reduces performance.

    Versions:
    python: 3.6.9
    xlread: 1.2.0
    openpyxl: 3.0.1

    openpyxl, read-only
        Workbook loaded 1.14s
        OptimizationData 23.17s
        Output Model 0.00s
        >>DATA>> 0.00s
        Store days 0% 23.92s
        Store days 100% 17.35s
        Total time 65.59s
        0 cells in total

    Versions:
    python: 3.7.5
    xlread: 1.2.0
    openpyxl: 3.0.1

    openpyxl, read-only
        Workbook loaded 0.98s
        OptimizationData 21.35s
        Output Model 0.00s
        >>DATA>> 0.00s
        Store days 0% 20.70s
        Store days 100% 16.16s
        Total time 59.19s
        0 cells in total

    Versions:
    python: 3.8.0
    xlread: 1.2.0
    openpyxl: 3.0.1

    openpyxl, read-only
        Workbook loaded 0.90s
        OptimizationData 19.58s
        Output Model 0.00s
        >>DATA>> 0.00s
        Store days 0% 19.35s
        Store days 100% 15.02s
        Total time 54.85s
        0 cells in total

##### Parallelisation

Reading worksheets is fairly CPU-intensive which limits any benefits to be gained by parallelisation. However, if you are mainly interested in dumping the contents of a workbook then you can use openpyxl’s read-only mode and open multiple instances of a workbook and take advantage of multiple CPUs.

Sample code using the same source file as for read performance shows that performance scales reasonably with only a slight overhead due to creating additional Python processes.

## Other topics

> ### Optimised Modes

> #### Read-only mode

> Sometimes, you will need to open or write extremely large XLSX files, and the common routines in openpyxl won’t be able to handle that load. Fortunately, there are two modes that enable you to read and write unlimited amounts of data with (near) constant memory consumption.

> Introducing `openpyxl.worksheet._read_only.ReadOnlyWorksheet`:

>     from openpyxl import load_workbook
>     wb = load_workbook(filename='large_file.xlsx', read_only=True)
>     ws = wb['big_data']

>     for row in ws.rows:
>         for cell in row:
>             print(cell.value)

>     # Close the workbook after reading
>     wb.close()

> Warning

> - `openpyxl.worksheet._read_only.ReadOnlyWorksheet` is read-only
> - Unlike a normal workbook, a read-only workbook will use lazy loading. The workbook must be explicitly closed with the `close()` method.

> Cells returned are not regular `openpyxl.cell.cell.Cell` but `openpyxl.cell._read_only.ReadOnlyCell`.

> ##### Worksheet dimensions

> Read-only mode relies on applications and libraries that created the file providing correct information about the worksheets, specifically the used part of it, known as the dimensions. Some applications set this incorrectly. You can check the apparent dimensions of a worksheet using ws.calculate_dimension(). If this returns a range that you know is incorrect, say A1:A1 then simply resetting the max_row and max_column attributes should allow you to work with the file:

>     ws.reset_dimensions()

> #### Write-only mode

> Here again, the regular `openpyxl.worksheet.worksheet.Worksheet` has been replaced by a faster alternative, the `openpyxl.worksheet._write_only.WriteOnlyWorksheet`. When you want to dump large amounts of data make sure you have lxml installed.

>     >>> from openpyxl import Workbook
>     >>> wb = Workbook(write_only=True)
>     >>> ws = wb.create_sheet()
>     >>>
>     >>> # now we'll fill it with 100 rows x 200 columns
>     >>>
>     >>> for irow in range(100):
>     ...     ws.append(['%d' % i for i in range(200)])
>     >>> # save the file
>     >>> wb.save('new_big_file.xlsx') # doctest: +SKIP

> If you want to have cells with styles or comments then use a `openpyxl.cell.WriteOnlyCell()`

>     >>> from openpyxl import Workbook
>     >>> wb = Workbook(write_only = True)
>     >>> ws = wb.create_sheet()
>     >>> from openpyxl.cell import WriteOnlyCell
>     >>> from openpyxl.comments import Comment
>     >>> from openpyxl.styles import Font
>     >>> cell = WriteOnlyCell(ws, value="hello world")
>     >>> cell.font = Font(name='Courier', size=36)
>     >>> cell.comment = Comment(text="A comment", author="Author's Name")
>     >>> ws.append([cell, 3.14, None])
>     >>> wb.save('write_only_file.xlsx')

> This will create a write-only workbook with a single sheet, and append a row of 3 cells: one text cell with a custom font and a comment, a floating-point number, and an empty cell (which will be discarded anyway).

> Warning

> - Unlike a normal workbook, a newly-created write-only workbook does not contain any worksheets; a worksheet must be specifically created with the `create_sheet()` method.
> - In a write-only workbook, rows can only be added with `append()`. It is not possible to write (or read) cells at arbitrary locations with `cell()` or `iter_rows()`.
> - It is able to export unlimited amount of data (even more than Excel can handle actually), while keeping memory usage under 10Mb.
> - A write-only workbook can only be saved once. After that, every attempt to save the workbook or append() to an existing worksheet will raise an `openpyxl.utils.exceptions.WorkbookAlreadySaved` exception.
> - Everything that appears in the file before the actual cell data must be created before cells are added because it must written to the file before then. For example, freeze_panes should be set before cells are added.

> ### Inserting and deleting rows and columns, moving ranges of cells

> #### Inserting rows and columns

> You can insert rows or columns using the relevant worksheet methods:

> > - `openpyxl.worksheet.worksheet.Worksheet.insert_rows()`
> > - `openpyxl.worksheet.worksheet.Worksheet.insert_cols()`
> > - `openpyxl.worksheet.worksheet.Worksheet.delete_rows()`
> > - `openpyxl.worksheet.worksheet.Worksheet.delete_cols()`

> The default is one row or column. For example to insert a row at 7 (before the existing row 7):

>     >>> ws.insert_rows(7)

> #### Deleting rows and columns

> To delete the columns `F:H`:

>     >>> ws.delete_cols(6, 3)

> Note

> Openpyxl does not manage dependencies, such as formulae, tables, charts, etc., when rows or columns are inserted or deleted. This is considered to be out of scope for a library that focuses on managing the file format. As a result, client code must implement the functionality required in any particular use case.

> #### Moving ranges of cells

> You can also move ranges of cells within a worksheet:

>     >>> ws.move_range("D4:F10", rows=-1, cols=2)

> This will move the cells in the range `D4:F10` up one row, and right two columns. The cells will overwrite any existing cells.

> If cells contain formulae you can let openpyxl translate these for you, but as this is not always what you want it is disabled by default. Also only the formulae in the cells themselves will be translated. References to the cells from other cells or defined names will not be updated; you can use the Parsing Formulas translator to do this:

>     >>> ws.move_range("G4:H10", rows=1, cols=1, translate=True)

> This will move the relative references in formulae in the range by one row and one column.

> ### Working with Pandas and NumPy

> openpyxl is able to work with the popular libraries Pandas and NumPy

> #### NumPy Support

> openpyxl has builtin support for the NumPy types float, integer and boolean. DateTimes are supported using the Pandas’ Timestamp type.

> #### Working with Pandas Dataframes

> The `openpyxl.utils.dataframe.dataframe_to_rows()` function provides a simple way to work with Pandas Dataframes:

>     from openpyxl.utils.dataframe import dataframe_to_rows
>     wb = Workbook()
>     ws = wb.active

>     for r in dataframe_to_rows(df, index=True, header=True):
>         ws.append(r)

> While Pandas itself supports conversion to Excel, this gives client code additional flexibility including the ability to stream dataframes straight to files.

> To convert a dataframe into a worksheet highlighting the header and index:

>     wb = Workbook()
>     ws = wb.active

>     for r in dataframe_to_rows(df, index=True, header=True):
>         ws.append(r)

>     for cell in ws['A'] + ws[1]:
>         cell.style = 'Pandas'

>     wb.save("pandas_openpyxl.xlsx")

> Alternatively, if you just want to convert the data you can use write-only mode:

>     from openpyxl.cell.cell import WriteOnlyCell
>     wb = Workbook(write_only=True)
>     ws = wb.create_sheet()

>     cell = WriteOnlyCell(ws)
>     cell.style = 'Pandas'

>      def format_first_row(row, cell):

>         for c in row:
>             cell.value = c
>             yield cell

>     rows = dataframe_to_rows(df)
>     first_row = format_first_row(next(rows), cell)
>     ws.append(first_row)

>     for row in rows:
>         row = list(row)
>         cell.value = row[0]
>         row[0] = cell
>         ws.append(row)

>     wb.save("openpyxl_stream.xlsx")

> This code will work just as well with a standard workbook.

> #### Converting a worksheet to a Dataframe

> To convert a worksheet to a Dataframe you can use the values property. This is very easy if the worksheet has no headers or indices:

>     df = DataFrame(ws.values)

> If the worksheet does have headers or indices, such as one created by Pandas, then a little more work is required:

>     from itertools import islice
>     data = ws.values
>     cols = next(data)[1:]
>     data = list(data)
>     idx = [r[0] for r in data]
>     data = (islice(r, 1, None) for r in data)
>     df = DataFrame(data, index=idx, columns=cols)

> ### Charts

> #### Chart types

> The following charts are available:

> ##### Area Charts

> ###### 2D Area Charts

> Area charts are similar to line charts with the addition that the area underneath the plotted line is filled. Different variants are available by setting the grouping to “standard”, “stacked” or “percentStacked”; “standard” is the default.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         AreaChart,
>         Reference,
>         Series,
>     )

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Number', 'Batch 1', 'Batch 2'],
>         [2, 40, 30],
>         [3, 40, 25],
>         [4, 50, 30],
>         [5, 30, 10],
>         [6, 25, 5],
>         [7, 50, 10],
>     ]

>     for row in rows:
>         ws.append(row)

>     chart = AreaChart()
>     chart.title = "Area Chart"
>     chart.style = 13
>     chart.x_axis.title = 'Test'
>     chart.y_axis.title = 'Percentage'

>     cats = Reference(ws, min_col=1, min_row=1, max_row=7)
>     data = Reference(ws, min_col=2, min_row=1, max_col=3, max_row=7)
>     chart.add_data(data, titles_from_data=True)
>     chart.set_categories(cats)

>     ws.add_chart(chart, "A10")

>     wb.save("area.xlsx")

> ###### 3D Area Charts

> You can also create 3D area charts

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         AreaChart3D,
>         Reference,
>         Series,
>     )

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Number', 'Batch 1', 'Batch 2'],
>         [2, 30, 40],
>         [3, 25, 40],
>         [4 ,30, 50],
>         [5 ,10, 30],
>         [6,  5, 25],
>         [7 ,10, 50],
>     ]

>     for row in rows:
>         ws.append(row)

>     chart = AreaChart3D()
>     chart.title = "Area Chart"
>     chart.style = 13
>     chart.x_axis.title = 'Test'
>     chart.y_axis.title = 'Percentage'
>     chart.legend = None

>     cats = Reference(ws, min_col=1, min_row=1, max_row=7)
>     data = Reference(ws, min_col=2, min_row=1, max_col=3, max_row=7)
>     chart.add_data(data, titles_from_data=True)
>     chart.set_categories(cats)

>     ws.add_chart(chart, "A10")

>     wb.save("area3D.xlsx")

> This produces a simple 3D area chart where the third axis can be used to replace the legend:

> ##### Bar and Column Charts

> In bar charts values are plotted as either horizontal bars or vertical columns.

> ###### Vertical, Horizontal and Stacked Bar Charts

> Note

> The following settings affect the different chart types.

> Switch between vertical and horizontal bar charts by setting type to col or bar respectively.

> When using stacked charts the overlap needs to be set to 100.

> If bars are horizontal, x and y axes are reversed.

>     from openpyxl import Workbook
>     from openpyxl.chart import BarChart, Series, Reference

>     wb = Workbook(write_only=True)
>     ws = wb.create_sheet()

>     rows = [
>         ('Number', 'Batch 1', 'Batch 2'),
>         (2, 10, 30),
>         (3, 40, 60),
>         (4, 50, 70),
>         (5, 20, 10),
>         (6, 10, 40),
>         (7, 50, 30),
>     ]

>     for row in rows:
>         ws.append(row)

>     chart1 = BarChart()
>     chart1.type = "col"
>     chart1.style = 10
>     chart1.title = "Bar Chart"
>     chart1.y_axis.title = 'Test number'
>     chart1.x_axis.title = 'Sample length (mm)'

>     data = Reference(ws, min_col=2, min_row=1, max_row=7, max_col=3)
>     cats = Reference(ws, min_col=1, min_row=2, max_row=7)
>     chart1.add_data(data, titles_from_data=True)
>     chart1.set_categories(cats)
>     chart1.shape = 4
>     ws.add_chart(chart1, "A10")

>     from copy import deepcopy

>     chart2 = deepcopy(chart1)
>     chart2.style = 11
>     chart2.type = "bar"
>     chart2.title = "Horizontal Bar Chart"

>     ws.add_chart(chart2, "G10")

>     chart3 = deepcopy(chart1)
>     chart3.type = "col"
>     chart3.style = 12
>     chart3.grouping = "stacked"
>     chart3.overlap = 100
>     chart3.title = 'Stacked Chart'

>     ws.add_chart(chart3, "A27")

>     chart4 = deepcopy(chart1)
>     chart4.type = "bar"
>     chart4.style = 13
>     chart4.grouping = "percentStacked"
>     chart4.overlap = 100
>     chart4.title = 'Percent Stacked Chart'

>     ws.add_chart(chart4, "G27")

>     wb.save("bar.xlsx")

> This will produce four charts illustrating the various possibilities.

> ###### 3D Bar Charts

> You can also create 3D bar charts

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         Reference,
>         Series,
>         BarChart3D,
>     )

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         (None, 2013, 2014),
>         ("Apples", 5, 4),
>         ("Oranges", 6, 2),
>         ("Pears", 8, 3)
>     ]

>     for row in rows:
>         ws.append(row)

>     data = Reference(ws, min_col=2, min_row=1, max_col=3, max_row=4)
>     titles = Reference(ws, min_col=1, min_row=2, max_row=4)
>     chart = BarChart3D()
>     chart.title = "3D Bar Chart"
>     chart.add_data(data=data, titles_from_data=True)
>     chart.set_categories(titles)

>     ws.add_chart(chart, "E5")
>     wb.save("bar3d.xlsx")

> This produces a simple 3D bar chart

> ##### Bubble Charts

> Bubble charts are similar to scatter charts but use a third dimension to determine the size of the bubbles. Charts can include multiple series.

>     """
>     Sample bubble chart
>     """

>     from openpyxl import Workbook
>     from openpyxl.chart import Series, Reference, BubbleChart

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ("Number of Products", "Sales in USD", "Market share"),
>         (14, 12200, 15),
>         (20, 60000, 33),
>         (18, 24400, 10),
>         (22, 32000, 42),
>         (),
>         (12, 8200, 18),
>         (15, 50000, 30),
>         (19, 22400, 15),
>         (25, 25000, 50),
>     ]

>     for row in rows:
>         ws.append(row)

>     chart = BubbleChart()
>     chart.style = 18 # use a preset style

>     # add the first series of data
>     xvalues = Reference(ws, min_col=1, min_row=2, max_row=5)
>     yvalues = Reference(ws, min_col=2, min_row=2, max_row=5)
>     size = Reference(ws, min_col=3, min_row=2, max_row=5)
>     series = Series(values=yvalues, xvalues=xvalues, zvalues=size, title="2013")
>     chart.series.append(series)

>     # add the second
>     xvalues = Reference(ws, min_col=1, min_row=7, max_row=10)
>     yvalues = Reference(ws, min_col=2, min_row=7, max_row=10)
>     size = Reference(ws, min_col=3, min_row=7, max_row=10)
>     series = Series(values=yvalues, xvalues=xvalues, zvalues=size, title="2014")
>     chart.series.append(series)

>     # place the chart starting in cell E1
>     ws.add_chart(chart, "E1")
>     wb.save("bubble.xlsx")

> This will produce a bubble chart with two series and should look something like this:

> ##### Line Charts

> Line charts allow data to be plotted against a fixed axis. They are similar to scatter charts, the main difference is that with line charts each data series is plotted against the same values. Different kinds of axes can be used for the secondary axes.

> Similar to bar charts there are three kinds of line charts: standard, stacked and percentStacked.

>     from datetime import date

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         LineChart,
>         Reference,
>     )
>     from openpyxl.chart.axis import DateAxis

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Date', 'Batch 1', 'Batch 2', 'Batch 3'],
>         [date(2015,9, 1), 40, 30, 25],
>         [date(2015,9, 2), 40, 25, 30],
>         [date(2015,9, 3), 50, 30, 45],
>         [date(2015,9, 4), 30, 25, 40],
>         [date(2015,9, 5), 25, 35, 30],
>         [date(2015,9, 6), 20, 40, 35],
>     ]

>     for row in rows:
>         ws.append(row)

>     c1 = LineChart()
>     c1.title = "Line Chart"
>     c1.style = 13
>     c1.y_axis.title = 'Size'
>     c1.x_axis.title = 'Test Number'

>     data = Reference(ws, min_col=2, min_row=1, max_col=4, max_row=7)
>     c1.add_data(data, titles_from_data=True)

>     # Style the lines
>     s1 = c1.series[0]
>     s1.marker.symbol = "triangle"
>     s1.marker.graphicalProperties.solidFill = "FF0000" # Marker filling
>     s1.marker.graphicalProperties.line.solidFill = "FF0000" # Marker outline

>     s1.graphicalProperties.line.noFill = True

>     s2 = c1.series[1]
>     s2.graphicalProperties.line.solidFill = "00AAAA"
>     s2.graphicalProperties.line.dashStyle = "sysDot"
>     s2.graphicalProperties.line.width = 100050 # width in EMUs

>     s2 = c1.series[2]
>     s2.smooth = True # Make the line smooth

>     ws.add_chart(c1, "A10")

>     from copy import deepcopy
>     stacked = deepcopy(c1)
>     stacked.grouping = "stacked"
>     stacked.title = "Stacked Line Chart"
>     ws.add_chart(stacked, "A27")

>     percent_stacked = deepcopy(c1)
>     percent_stacked.grouping = "percentStacked"
>     percent_stacked.title = "Percent Stacked Line Chart"
>     ws.add_chart(percent_stacked, "A44")

>     # Chart with date axis
>     c2 = LineChart()
>     c2.title = "Date Axis"
>     c2.style = 12
>     c2.y_axis.title = "Size"
>     c2.y_axis.crossAx = 500
>     c2.x_axis = DateAxis(crossAx=100)
>     c2.x_axis.number_format = 'd-mmm'
>     c2.x_axis.majorTimeUnit = "days"
>     c2.x_axis.title = "Date"

>     c2.add_data(data, titles_from_data=True)
>     dates = Reference(ws, min_col=1, min_row=2, max_row=7)
>     c2.set_categories(dates)

>     ws.add_chart(c2, "A61")

>     wb.save("line.xlsx")

> ###### 3D Line Charts

> In 3D line charts the third axis is the same as the legend for the series.

>     from datetime import date

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         LineChart3D,
>         Reference,
>     )
>     from openpyxl.chart.axis import DateAxis

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Date', 'Batch 1', 'Batch 2', 'Batch 3'],
>         [date(2015,9, 1), 40, 30, 25],
>         [date(2015,9, 2), 40, 25, 30],
>         [date(2015,9, 3), 50, 30, 45],
>         [date(2015,9, 4), 30, 25, 40],
>         [date(2015,9, 5), 25, 35, 30],
>         [date(2015,9, 6), 20, 40, 35],
>     ]

>     for row in rows:
>         ws.append(row)

>     c1 = LineChart3D()
>     c1.title = "3D Line Chart"
>     c1.legend = None
>     c1.style = 15
>     c1.y_axis.title = 'Size'
>     c1.x_axis.title = 'Test Number'

>     data = Reference(ws, min_col=2, min_row=1, max_col=4, max_row=7)
>     c1.add_data(data, titles_from_data=True)

>     ws.add_chart(c1, "A10")

>     wb.save("line3D.xlsx")

> ##### Scatter Charts

> Scatter, or xy, charts are similar to some line charts. The main difference is that one series of values is plotted against another. This is useful where values are unordered.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         ScatterChart,
>         Reference,
>         Series,
>     )

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Size', 'Batch 1', 'Batch 2'],
>         [2, 40, 30],
>         [3, 40, 25],
>         [4, 50, 30],
>         [5, 30, 25],
>         [6, 25, 35],
>         [7, 20, 40],
>     ]

>     for row in rows:
>         ws.append(row)

>     chart = ScatterChart()
>     chart.title = "Scatter Chart"
>     chart.style = 13
>     chart.x_axis.title = 'Size'
>     chart.y_axis.title = 'Percentage'

>     xvalues = Reference(ws, min_col=1, min_row=2, max_row=7)
>     for i in range(2, 4):
>         values = Reference(ws, min_col=i, min_row=1, max_row=7)
>         series = Series(values, xvalues, title_from_data=True)
>         chart.series.append(series)

>     ws.add_chart(chart, "A10")

>     wb.save("scatter.xlsx")

> Note

> The specification says that there are the following types of scatter charts: ‘line’, ‘lineMarker’, ‘marker’, ‘smooth’, ‘smoothMarker’. However, at least in Microsoft Excel, this is just a shortcut for other settings that otherwise have no effect. For consistency with line charts, the style for each series should be set manually.

> ##### Pie Charts

> Pie charts plot data as slices of a circle with each slice representing the percentage of the whole. Slices are plotted in a clockwise direction with 0° being at the top of the circle. Pie charts can only take a single series of data. The title of the chart will default to being the title of the series.

>     from openpyxl import Workbook

>     from openpyxl.chart import (
>         PieChart,
>         ProjectedPieChart,
>         Reference
>     )
>     from openpyxl.chart.series import DataPoint

>     data = [
>         ['Pie', 'Sold'],
>         ['Apple', 50],
>         ['Cherry', 30],
>         ['Pumpkin', 10],
>         ['Chocolate', 40],
>     ]

>     wb = Workbook()
>     ws = wb.active

>     for row in data:
>         ws.append(row)

>     pie = PieChart()
>     labels = Reference(ws, min_col=1, min_row=2, max_row=5)
>     data = Reference(ws, min_col=2, min_row=1, max_row=5)
>     pie.add_data(data, titles_from_data=True)
>     pie.set_categories(labels)
>     pie.title = "Pies sold by category"

>     # Cut the first slice out of the pie
>     slice = DataPoint(idx=0, explosion=20)
>     pie.series[0].data_points = [slice]

>     ws.add_chart(pie, "D1")

>     ws = wb.create_sheet(title="Projection")

>     data = [
>         ['Page', 'Views'],
>         ['Search', 95],
>         ['Products', 4],
>         ['Offers', 0.5],
>         ['Sales', 0.5],
>     ]

>     for row in data:
>         ws.append(row)

>     projected_pie = ProjectedPieChart()
>     projected_pie.type = "pie"
>     projected_pie.splitType = "val" # split by value
>     labels = Reference(ws, min_col=1, min_row=2, max_row=5)
>     data = Reference(ws, min_col=2, min_row=1, max_row=5)
>     projected_pie.add_data(data, titles_from_data=True)
>     projected_pie.set_categories(labels)

>     ws.add_chart(projected_pie, "A10")

>     from copy import deepcopy
>     projected_bar = deepcopy(projected_pie)
>     projected_bar.type = "bar"
>     projected_bar.splitType = 'pos' # split by position

>     ws.add_chart(projected_bar, "A27")

>     wb.save("pie.xlsx")

> ###### Projected Pie Charts

> Projected pie charts extract some slices from a pie chart and project them into a second pie or bar chart. This is useful when there are several smaller items in the data series. The chart can be split according to percent, val(ue) or pos(ition). If nothing is set then the application decides which to use. In addition custom splits can be defined.

> ###### 3D Pie Charts

> Pie charts can also be created with a 3D effect.

>     from openpyxl import Workbook

>     from openpyxl.chart import (
>         PieChart3D,
>         Reference
>     )

>     data = [
>         ['Pie', 'Sold'],
>         ['Apple', 50],
>         ['Cherry', 30],
>         ['Pumpkin', 10],
>         ['Chocolate', 40],
>     ]

>     wb = Workbook()
>     ws = wb.active

>     for row in data:
>         ws.append(row)

>     pie = PieChart3D()
>     labels = Reference(ws, min_col=1, min_row=2, max_row=5)
>     data = Reference(ws, min_col=2, min_row=1, max_row=5)
>     pie.add_data(data, titles_from_data=True)
>     pie.set_categories(labels)
>     pie.title = "Pies sold by category"

>     ws.add_chart(pie, "D1")

>     wb.save("pie3D.xlsx")

> ###### Gradient Pie Charts

> Pie charts can also be created with gradient series.

>     from openpyxl import Workbook

>     from openpyxl.chart import (
>         PieChart,
>         Reference
>     )
>     from openpyxl.chart.series import DataPoint
>     from openpyxl.chart.shapes import GraphicalProperties
>     from openpyxl.drawing.fill import (
>         GradientFillProperties,
>         GradientStop,
>         LinearShadeProperties
>     )
>     from openpyxl.drawing.colors import SchemeColor

>     data = [
>         ['Pie', 'Sold'],
>         ['Apple', 50],
>         ['Cherry', 30],
>         ['Pumpkin', 10],
>         ['Chocolate', 40],
>     ]

>     wb = Workbook()
>     ws = wb.active

>     for row in data:
>         ws.append(row)

>     pie = PieChart()
>     labels = Reference(ws, min_col=1, min_row=2, max_row=5)
>     data = Reference(ws, min_col=2, min_row=1, max_row=5)
>     pie.add_data(data, titles_from_data=True)
>     pie.set_categories(labels)
>     pie.title = "Pies sold by category"

>     # Cut the first slice out of the pie and apply a gradient to it
>     slice = DataPoint(
>         idx=0,
>         explosion=20,
>         spPr=GraphicalProperties(
>             gradFill=GradientFillProperties(
>                 gsLst=(
>                     GradientStop(
>                         pos=0,
>                         prstClr='blue'
>                     ),
>                     GradientStop(
>                         pos=100000,
>                         schemeClr=SchemeColor(
>                             val='accent1',
>                             lumMod=30000,
>                             lumOff=70000
>                         )
>                     )
>                 )
>             )
>         )
>     )
>     pie.series[0].data_points = [slice]

>     ws.add_chart(pie, "D1")

>     wb.save("pie.xlsx")

> ##### Doughnut Charts

> Doughnut charts are similar to pie charts except that they use a ring instead of a circle. They can also plot several series of data as concentric rings.

>     from openpyxl import Workbook

>     from openpyxl.chart import (
>         DoughnutChart,
>         Reference,
>         Series,
>     )
>     from openpyxl.chart.series import DataPoint

>     data = [
>         ['Pie', 2014, 2015],
>         ['Plain', 40, 50],
>         ['Jam', 2, 10],
>         ['Lime', 20, 30],
>         ['Chocolate', 30, 40],
>     ]

>     wb = Workbook()
>     ws = wb.active

>     for row in data:
>         ws.append(row)

>     chart = DoughnutChart()
>     labels = Reference(ws, min_col=1, min_row=2, max_row=5)
>     data = Reference(ws, min_col=2, min_row=1, max_row=5)
>     chart.add_data(data, titles_from_data=True)
>     chart.set_categories(labels)
>     chart.title = "Doughnuts sold by category"
>     chart.style = 26

>     # Cut the first slice out of the doughnut
>     slices = [DataPoint(idx=i) for i in range(4)]
>     plain, jam, lime, chocolate = slices
>     chart.series[0].data_points = slices
>     plain.graphicalProperties.solidFill = "FAE1D0"
>     jam.graphicalProperties.solidFill = "BB2244"
>     lime.graphicalProperties.solidFill = "22DD22"
>     chocolate.graphicalProperties.solidFill = "61210B"
>     chocolate.explosion = 10

>     ws.add_chart(chart, "E1")

>     from copy import deepcopy

>     chart2 = deepcopy(chart)
>     chart2.title = None
>     data = Reference(ws, min_col=3, min_row=1, max_row=5)
>     series2 = Series(data, title_from_data=True)
>     series2.data_points = slices
>     chart2.series.append(series2)

>     ws.add_chart(chart2, "E17")

>     wb.save("doughnut.xlsx")

> ##### Radar Charts

> Data that is arranged in columns or rows on a worksheet can be plotted in a radar chart. Radar charts compare the aggregate values of multiple data series. It is effectively a projection of an area chart on a circular x-axis.

> There are two types of radar chart: standard, where the area is marked with a line; and filled, where the whole area is filled. The additional type “marker” has no effect. If markers are desired these can be set for the relevant series.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         RadarChart,
>         Reference,
>     )

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Month', "Bulbs", "Seeds", "Flowers", "Trees & shrubs"],
>         ['Jan', 0, 2500, 500, 0,],
>         ['Feb', 0, 5500, 750, 1500],
>         ['Mar', 0, 9000, 1500, 2500],
>         ['Apr', 0, 6500, 2000, 4000],
>         ['May', 0, 3500, 5500, 3500],
>         ['Jun', 0, 0, 7500, 1500],
>         ['Jul', 0, 0, 8500, 800],
>         ['Aug', 1500, 0, 7000, 550],
>         ['Sep', 5000, 0, 3500, 2500],
>         ['Oct', 8500, 0, 2500, 6000],
>         ['Nov', 3500, 0, 500, 5500],
>         ['Dec', 500, 0, 100, 3000 ],
>     ]

>     for row in rows:
>         ws.append(row)

>     chart = RadarChart()
>     chart.type = "filled"
>     labels = Reference(ws, min_col=1, min_row=2, max_row=13)
>     data = Reference(ws, min_col=2, max_col=5, min_row=1, max_row=13)
>     chart.add_data(data, titles_from_data=True)
>     chart.set_categories(labels)
>     chart.style = 26
>     chart.title = "Garden Centre Sales"
>     chart.y_axis.delete = True

>     ws.add_chart(chart, "A17")

>     wb.save("radar.xlsx")

> ##### Stock Charts

> Data that is arranged in columns or rows in a specific order on a worksheet can be plotted in a stock chart. As its name implies, a stock chart is most often used to illustrate the fluctuation of stock prices. However, this chart may also be used for scientific data. For example, you could use a stock chart to indicate the fluctuation of daily or annual temperatures. You must organize your data in the correct order to create stock charts.

> The way stock chart data is organized in the worksheet is very important. For example, to create a simple high-low-close stock chart, you should arrange your data with High, Low, and Close entered as column headings, in that order.

> Although stock charts are a distinct type, the various types are just shortcuts for particular formatting options:

> > - high-low-close is essentially a line chart with no lines and the marker set to XYZ. It also sets hiLoLines to True
> > - open-high-low-close is the same as a high-low-close chart with the marker for each data point set to XZZ and upDownLines.

> Volume can be added by combining the stock chart with a bar chart for the volume.

>     from datetime import date

>     from openpyxl import Workbook

>     from openpyxl.chart import (
>         BarChart,
>         StockChart,
>         Reference,
>         Series,
>     )
>     from openpyxl.chart.axis import DateAxis, ChartLines
>     from openpyxl.chart.updown_bars import UpDownBars

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>        ['Date',      'Volume','Open', 'High', 'Low', 'Close'],
>        ['2015-01-01', 20000,    26.2, 27.20, 23.49, 25.45,  ],
>        ['2015-01-02', 10000,    25.45, 25.03, 19.55, 23.05, ],
>        ['2015-01-03', 15000,    23.05, 24.46, 20.03, 22.42, ],
>        ['2015-01-04', 2000,     22.42, 23.97, 20.07, 21.90, ],
>        ['2015-01-05', 12000,    21.9, 23.65, 19.50, 21.51,  ],
>     ]

>     for row in rows:
>         ws.append(row)

>     # High-low-close
>     c1 = StockChart()
>     labels = Reference(ws, min_col=1, min_row=2, max_row=6)
>     data = Reference(ws, min_col=4, max_col=6, min_row=1, max_row=6)
>     c1.add_data(data, titles_from_data=True)
>     c1.set_categories(labels)
>     for s in c1.series:
>         s.graphicalProperties.line.noFill = True
>     # marker for close
>     s.marker.symbol = "dot"
>     s.marker.size = 5
>     c1.title = "High-low-close"
>     c1.hiLowLines = ChartLines()

>     # Excel is broken and needs a cache of values in order to display hiLoLines :-/
>     from openpyxl.chart.data_source import NumData, NumVal
>     pts = [NumVal(idx=i) for i in range(len(data) - 1)]
>     cache = NumData(pt=pts)
>     c1.series[-1].val.numRef.numCache = cache

>     ws.add_chart(c1, "A10")

>     # Open-high-low-close
>     c2 = StockChart()
>     data = Reference(ws, min_col=3, max_col=6, min_row=1, max_row=6)
>     c2.add_data(data, titles_from_data=True)
>     c2.set_categories(labels)
>     for s in c2.series:
>         s.graphicalProperties.line.noFill = True
>     c2.hiLowLines = ChartLines()
>     c2.upDownBars = UpDownBars()
>     c2.title = "Open-high-low-close"

>     # add dummy cache
>     c2.series[-1].val.numRef.numCache = cache

>     ws.add_chart(c2, "G10")

>     # Create bar chart for volume

>     bar = BarChart()
>     data =  Reference(ws, min_col=2, min_row=1, max_row=6)
>     bar.add_data(data, titles_from_data=True)
>     bar.set_categories(labels)

>     from copy import deepcopy

>     # Volume-high-low-close
>     b1 = deepcopy(bar)
>     c3 = deepcopy(c1)
>     c3.y_axis.majorGridlines = None
>     c3.y_axis.title = "Price"
>     b1.y_axis.axId = 20
>     b1.z_axis = c3.y_axis
>     b1.y_axis.crosses = "max"
>     b1 += c3

>     c3.title = "High low close volume"

>     ws.add_chart(b1, "A27")

>     ## Volume-open-high-low-close
>     b2 = deepcopy(bar)
>     c4 = deepcopy(c2)
>     c4.y_axis.majorGridlines = None
>     c4.y_axis.title = "Price"
>     b2.y_axis.axId = 20
>     b2.z_axis = c4.y_axis
>     b2.y_axis.crosses = "max"
>     b2 += c4

>     ws.add_chart(b2, "G27")

>     wb.save("stock.xlsx")

> Warning

> Due to a bug in Excel high-low lines will only be shown if at least one of the data series has some dummy values. This can be done with the following hack:

>     from openpyxl.chart.data_source import NumData, NumVal
>     pts = [NumVal(idx=i) for i in range(len(data) - 1)]
>     cache = NumData(pt=pts)
>     c1.series[-1].val.numRef.numCache = cache

> ##### Surface charts

> Data that is arranged in columns or rows on a worksheet can be plotted in a surface chart. A surface chart is useful when you want to find optimum combinations between two sets of data. As in a topographic map, colors and patterns indicate areas that are in the same range of values.

> By default all surface charts are 3D. 2D wireframe and contour charts are created by setting the rotation and perspective.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         SurfaceChart,
>         SurfaceChart3D,
>         Reference,
>         Series,
>     )
>     from openpyxl.chart.axis import SeriesAxis

>     wb = Workbook()
>     ws = wb.active

>     data = [
>         [None, 10, 20, 30, 40, 50,],
>         [0.1, 15, 65, 105, 65, 15,],
>         [0.2, 35, 105, 170, 105, 35,],
>         [0.3, 55, 135, 215, 135, 55,],
>         [0.4, 75, 155, 240, 155, 75,],
>         [0.5, 80, 190, 245, 190, 80,],
>         [0.6, 75, 155, 240, 155, 75,],
>         [0.7, 55, 135, 215, 135, 55,],
>         [0.8, 35, 105, 170, 105, 35,],
>         [0.9, 15, 65, 105, 65, 15],
>     ]

>     for row in data:
>         ws.append(row)

>     c1 = SurfaceChart()
>     ref = Reference(ws, min_col=2, max_col=6, min_row=1, max_row=10)
>     labels = Reference(ws, min_col=1, min_row=2, max_row=10)
>     c1.add_data(ref, titles_from_data=True)
>     c1.set_categories(labels)
>     c1.title = "Contour"

>     ws.add_chart(c1, "A12")

>     from copy import deepcopy

>     # wireframe
>     c2 = deepcopy(c1)
>     c2.wireframe = True
>     c2.title = "2D Wireframe"

>     ws.add_chart(c2, "G12")

>     # 3D Surface
>     c3 = SurfaceChart3D()
>     c3.add_data(ref, titles_from_data=True)
>     c3.set_categories(labels)
>     c3.title = "Surface"

>     ws.add_chart(c3, "A29")

>     c4 = deepcopy(c3)
>     c4.wireframe = True
>     c4.title = "3D Wireframe"

>     ws.add_chart(c4, "G29")

>     wb.save("surface.xlsx")

> #### Creating a chart

> Charts are composed of at least one series of one or more data points. Series themselves are comprised of references to cell ranges.

>     >>> from openpyxl import Workbook
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>> for i in range(10):
>     ...     ws.append([i])
>     >>>
>     >>> from openpyxl.chart import BarChart, Reference, Series
>     >>> values = Reference(ws, min_col=1, min_row=1, max_col=1, max_row=10)
>     >>> chart = BarChart()
>     >>> chart.add_data(values)
>     >>> ws.add_chart(chart, "E15")
>     >>> wb.save("SampleChart.xlsx")

> By default the top-left corner of a chart is anchored to cell E15 and the size is 15 x 7.5 cm (approximately 5 columns by 14 rows). This can be changed by setting the anchor, width and height properties of the chart. The actual size will depend on operating system and device. Other anchors are possible; see `openpyxl.drawing.spreadsheet_drawing` for further information.

> #### Working with axes

> ##### Axis Limits and Scale

> ###### Minima and Maxima

> Axis minimum and maximum values can be set manually to display specific regions on a chart.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         ScatterChart,
>         Reference,
>         Series,
>     )

>     wb = Workbook()
>     ws = wb.active

>     ws.append(['X', '1/X'])
>     for x in range(-10, 11):
>         if x:
>             ws.append([x, 1.0 / x])

>     chart1 = ScatterChart()
>     chart1.title = "Full Axes"
>     chart1.x_axis.title = 'x'
>     chart1.y_axis.title = '1/x'
>     chart1.legend = None

>     chart2 = ScatterChart()
>     chart2.title = "Clipped Axes"
>     chart2.x_axis.title = 'x'
>     chart2.y_axis.title = '1/x'
>     chart2.legend = None

>     chart2.x_axis.scaling.min = 0
>     chart2.y_axis.scaling.min = 0
>     chart2.x_axis.scaling.max = 11
>     chart2.y_axis.scaling.max = 1.5

>     x = Reference(ws, min_col=1, min_row=2, max_row=22)
>     y = Reference(ws, min_col=2, min_row=2, max_row=22)
>     s = Series(y, xvalues=x)
>     chart1.append(s)
>     chart2.append(s)

>     ws.add_chart(chart1, "C1")
>     ws.add_chart(chart2, "C15")

>     wb.save("minmax.xlsx")

> Note

> In some cases such as the one shown, setting the axis limits is effectively equivalent to displaying a sub-range of the data. For large datasets, rendering of scatter plots (and possibly others) will be much faster when using subsets of the data rather than axis limits in both Excel and Open/Libre Office.

> ###### Logarithmic Scaling

> Both the x- and y-axes can be scaled logarithmically. The base of the logarithm can be set to any valid float. If the x-axis is scaled logarithmically, negative values in the domain will be discarded.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         ScatterChart,
>         Reference,
>         Series,
>     )
>     import math

>     wb = Workbook()
>     ws = wb.active

>     ws.append(['X', 'Gaussian'])
>     for i, x in enumerate(range(-10, 11)):
>         ws.append([x, "=EXP(-(($A${row}/6)^2))".format(row = i + 2)])

>     chart1 = ScatterChart()
>     chart1.title = "No Scaling"
>     chart1.x_axis.title = 'x'
>     chart1.y_axis.title = 'y'
>     chart1.legend = None

>     chart2 = ScatterChart()
>     chart2.title = "X Log Scale"
>     chart2.x_axis.title = 'x (log10)'
>     chart2.y_axis.title = 'y'
>     chart2.legend = None
>     chart2.x_axis.scaling.logBase = 10

>     chart3 = ScatterChart()
>     chart3.title = "Y Log Scale"
>     chart3.x_axis.title = 'x'
>     chart3.y_axis.title = 'y (log10)'
>     chart3.legend = None
>     chart3.y_axis.scaling.logBase = 10

>     chart4 = ScatterChart()
>     chart4.title = "Both Log Scale"
>     chart4.x_axis.title = 'x (log10)'
>     chart4.y_axis.title = 'y (log10)'
>     chart4.legend = None
>     chart4.x_axis.scaling.logBase = 10
>     chart4.y_axis.scaling.logBase = 10

>     chart5 = ScatterChart()
>     chart5.title = "Log Scale Base e"
>     chart5.x_axis.title = 'x (ln)'
>     chart5.y_axis.title = 'y (ln)'
>     chart5.legend = None
>     chart5.x_axis.scaling.logBase = math.e
>     chart5.y_axis.scaling.logBase = math.e

>     x = Reference(ws, min_col=1, min_row=2, max_row=22)
>     y = Reference(ws, min_col=2, min_row=2, max_row=22)
>     s = Series(y, xvalues=x)
>     chart1.append(s)
>     chart2.append(s)
>     chart3.append(s)
>     chart4.append(s)
>     chart5.append(s)

>     ws.add_chart(chart1, "C1")
>     ws.add_chart(chart2, "I1")
>     ws.add_chart(chart3, "C15")
>     ws.add_chart(chart4, "I15")
>     ws.add_chart(chart5, "F30")

>     wb.save("log.xlsx")

> This produces five charts that look something like this:

> The first four charts show the same data unscaled, scaled logarithmically in each axis and in both axes, with the logarithm base set to 10. The final chart shows the same data with both axes scaled, but the base of the logarithm set to `e`.

> ###### Axis Orientation

> Axes can be displayed “normally” or in reverse. Axis orientation is controlled by the scaling `orientation` property, which can have a value of either `'minMax'` for normal orientation or `'maxMin'` for reversed.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         ScatterChart,
>         Reference,
>         Series,
>     )

>     wb = Workbook()
>     ws = wb.active

>     ws["A1"] = "Archimedean Spiral"
>     ws.append(["T", "X", "Y"])
>     for i, t in enumerate(range(100)):
>         ws.append([t / 16.0, "=$A${row}*COS($A${row})".format(row = i + 3),
>                              "=$A${row}*SIN($A${row})".format(row = i + 3)])

>     chart1 = ScatterChart()
>     chart1.title = "Default Orientation"
>     chart1.x_axis.title = 'x'
>     chart1.y_axis.title = 'y'
>     chart1.legend = None

>     chart2 = ScatterChart()
>     chart2.title = "Flip X"
>     chart2.x_axis.title = 'x'
>     chart2.y_axis.title = 'y'
>     chart2.legend = None
>     chart2.x_axis.scaling.orientation = "maxMin"
>     chart2.y_axis.scaling.orientation = "minMax"

>     chart3 = ScatterChart()
>     chart3.title = "Flip Y"
>     chart3.x_axis.title = 'x'
>     chart3.y_axis.title = 'y'
>     chart3.legend = None
>     chart3.x_axis.scaling.orientation = "minMax"
>     chart3.y_axis.scaling.orientation = "maxMin"

>     chart4 = ScatterChart()
>     chart4.title = "Flip Both"
>     chart4.x_axis.title = 'x'
>     chart4.y_axis.title = 'y'
>     chart4.legend = None
>     chart4.x_axis.scaling.orientation = "maxMin"
>     chart4.y_axis.scaling.orientation = "maxMin"

>     x = Reference(ws, min_col=2, min_row=2, max_row=102)
>     y = Reference(ws, min_col=3, min_row=2, max_row=102)
>     s = Series(y, xvalues=x)
>     chart1.append(s)
>     chart2.append(s)
>     chart3.append(s)
>     chart4.append(s)

>     ws.add_chart(chart1, "D1")
>     ws.add_chart(chart2, "J1")
>     ws.add_chart(chart3, "D15")
>     ws.add_chart(chart4, "J15")

>     wb.save("orientation.xlsx")

> This produces four charts with the axes in each possible combination of orientations that look something like this:

> ##### Adding a second axis

> Adding a second axis actually involves creating a second chart that shares a common x-axis with the first chart but has a separate y-axis.

>     from openpyxl import Workbook
>     from openpyxl.chart import (
>         LineChart,
>         BarChart,
>         Reference,
>         Series,
>     )

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Aliens', 2, 3, 4, 5, 6, 7],
>         ['Humans', 10, 40, 50, 20, 10, 50],
>     ]

>     for row in rows:
>         ws.append(row)

>     c1 = BarChart()
>     v1 = Reference(ws, min_col=1, min_row=1, max_col=7)
>     c1.add_data(v1, titles_from_data=True, from_rows=True)

>     c1.x_axis.title = 'Days'
>     c1.y_axis.title = 'Aliens'
>     c1.y_axis.majorGridlines = None
>     c1.title = 'Survey results'

>     # Create a second chart
>     c2 = LineChart()
>     v2 = Reference(ws, min_col=1, min_row=2, max_col=7)
>     c2.add_data(v2, titles_from_data=True, from_rows=True)
>     c2.y_axis.axId = 200
>     c2.y_axis.title = "Humans"

>     # Display y-axis of the second chart on the right by setting it to cross the x-axis at its maximum
>     c1.y_axis.crosses = "max"
>     c1 += c2

>     ws.add_chart(c1, "D4")

>     wb.save("secondary.xlsx")

> This produces a combined line and bar chart looking something like this:

> #### Change the chart layout

> ##### Changing the layout of plot area and legend

> The layout of the chart within the canvas can be set by using the layout property of an instance of a layout class.

> ###### Chart layout

> Size and position

> The chart can be positioned within its container. `x` and `y` adjust position, `w` and `h` adjust the size . The units are proportions of the container. A chart cannot be positioned outside of its container and the width and height are the dominant constraints: if x + w > 1, then x = 1 - w.

> x is the horizontal position from the left
> y is the vertical position from the top
> h is the height of the chart relative to its container
> w is the width of the box
> Mode

> In addition to the size and position, the mode for the relevant attribute can also be set to either factor or edge. Factor is the default:

>     layout.xMode = edge

> Target

> The layoutTarget can be set to `outer` or `inner`. The default is `outer`:

>     layout.layoutTarget = inner

> ###### Legend layout

> The position of the legend can be controlled either by setting its position: `r`, `l`, `t`, `b`, and `tr`, for right, left, top, bottom and top right respectively. The default is `r`.

>     legend.position = 'tr'

> or applying a manual layout:

>     legend.layout = ManualLayout()

>     from openpyxl import Workbook, load_workbook
>     from openpyxl.chart import ScatterChart, Series, Reference
>     from openpyxl.chart.layout import Layout, ManualLayout

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ['Size', 'Batch 1', 'Batch 2'],
>         [2, 40, 30],
>         [3, 40, 25],
>         [4, 50, 30],
>         [5, 30, 25],
>         [6, 25, 35],
>         [7, 20, 40],
>     ]

>     for row in rows:
>         ws.append(row)

>     ch1 = ScatterChart()
>     xvalues = Reference(ws, min_col=1, min_row=2, max_row=7)
>     for i in range(2, 4):
>         values = Reference(ws, min_col=i, min_row=1, max_row=7)
>         series = Series(values, xvalues, title_from_data=True)
>         ch1.series.append(series)

>     ch1.title = "Default layout"
>     ch1.style = 13
>     ch1.x_axis.title = 'Size'
>     ch1.y_axis.title = 'Percentage'
>     ch1.legend.position = 'r'

>     ws.add_chart(ch1, "B10")

>     from copy import deepcopy

>     # Half-size chart, bottom right
>     ch2 = deepcopy(ch1)
>     ch2.title = "Manual chart layout"
>     ch2.legend.position = "tr"
>     ch2.layout=Layout(
>         manualLayout=ManualLayout(
>             x=0.25, y=0.25,
>             h=0.5, w=0.5,
>         )
>     )
>     ws.add_chart(ch2, "H10")

>     # Half-size chart, centred
>     ch3 = deepcopy(ch1)
>     ch3.layout = Layout(
>         ManualLayout(
>         x=0.25, y=0.25,
>         h=0.5, w=0.5,
>         xMode="edge",
>         yMode="edge",
>         )
>     )
>     ch3.title = "Manual chart layout, edge mode"
>     ws.add_chart(ch3, "B27")

>     # Manually position the legend bottom left
>     ch4 = deepcopy(ch1)
>     ch4.title = "Manual legend layout"
>     ch4.legend.layout = Layout(
>         manualLayout=ManualLayout(
>             yMode='edge',
>             xMode='edge',
>             x=0, y=0.9,
>             h=0.1, w=0.5
>         )
>     )

>     ws.add_chart(ch4, "H27")

>     wb.save("chart_layout.xlsx")

> This produces four charts illustrating various possibilities:

> #### Styling charts

> ##### Adding Patterns

> Whole data series and individual data points can be extensively styled through the graphicalProperties. Getting things just right may take some time.

>     from openpyxl import Workbook
>     from openpyxl.chart import BarChart, Reference
>     from openpyxl.chart.marker import DataPoint

>     from openpyxl.drawing.fill import PatternFillProperties, ColorChoice

>     wb = Workbook()
>     ws = wb.active

>     rows = [
>         ("Sample",),
>         (1,),
>         (2,),
>         (3,),
>         (2,),
>         (3,),
>         (3,),
>         (1,),
>         (2,),
>     ]

>     for r in rows:
>         ws.append(r)

>     c = BarChart()
>     data = Reference(ws, min_col=1, min_row=1, max_row=8)
>     c.add_data(data, titles_from_data=True)
>     c.title = "Chart with patterns"

>     # set a pattern for the whole series
>     series = c.series[0]
>     fill =  PatternFillProperties(prst="pct5")
>     fill.foreground = ColorChoice(prstClr="red")
>     fill.background = ColorChoice(prstClr="blue")
>     series.graphicalProperties.pattFill = fill

>     # set a pattern for a 6th data point (0-indexed)
>     pt = DataPoint(idx=5)
>     pt.graphicalProperties.pattFill = PatternFillProperties(prst="ltHorz")
>     series.dPt.append(pt)

>     ws.add_chart(c, "C1")

>     wb.save("pattern.xlsx")

> #### Advanced charts

> Charts can be combined to create new charts:

> ##### Gauge Charts

> Gauge charts combine a pie chart and a doughnut chart to create a “gauge”. The first chart is a doughnut chart with four slices. The first three slices correspond to the colours of the gauge; the fourth slice, which is half of the doughnut, is made invisible.

> A pie chart containing three slices is added. The first and third slice are invisible so that the second slice can act as the needle on the gauge.

> The effects are done using the graphical properties of individual data points in a data series.

>     from openpyxl import Workbook

>     from openpyxl.chart import PieChart, DoughnutChart, Series, Reference
>     from openpyxl.chart.series import DataPoint

>     data = [
>         ["Donut", "Pie"],
>         [25, 75],
>         [50, 1],
>         [25, 124],
>         [100],
>     ]

>     # based on http://www.excel-easy.com/examples/gauge-chart.html

>     wb = Workbook()
>     ws = wb.active
>     for row in data:
>         ws.append(row)

>     # First chart is a doughnut chart
>     c1 = DoughnutChart(firstSliceAng=270, holeSize=50)
>     c1.title = "Code coverage"
>     c1.legend = None

>     ref = Reference(ws, min_col=1, min_row=2, max_row=5)
>     s1 = Series(ref, title_from_data=False)

>     slices = [DataPoint(idx=i) for i in range(4)]
>     slices[0].graphicalProperties.solidFill = "FF3300" # red
>     slices[1].graphicalProperties.solidFill = "FCF305" # yellow
>     slices[2].graphicalProperties.solidFill = "1FB714" # green
>     slices[3].graphicalProperties.noFill = True # invisible

>     s1.data_points = slices
>     c1.series = [s1]

>     # Second chart is a pie chart
>     c2 = PieChart(firstSliceAng=270)
>     c2.legend = None

>     ref = Reference(ws, min_col=2, min_row=2, max_col=2, max_row=4)
>     s2 = Series(ref, title_from_data=False)

>     slices = [DataPoint(idx=i) for i in range(3)]
>     slices[0].graphicalProperties.noFill = True # invisible
>     slices[1].graphicalProperties.solidFill = "000000" # black needle
>     slices[2].graphicalProperties.noFill = True # invisible
>     s2.data_points = slices
>     c2.series = [s2]

>     c1 += c2 # combine charts

>     ws.add_chart(c1, "D1")

>     wb.save("gauge.xlsx")

> #### Using chartsheets

> Charts can be added to special worksheets called chartsheets:

> ##### Chartsheets

> Chartsheets are special worksheets which only contain charts. All the data for the chart must be on a different worksheet.

>     from openpyxl import Workbook

>     from openpyxl.chart import PieChart, Reference, Series

>     wb = Workbook()
>     ws = wb.active
>     cs = wb.create_chartsheet()

>     rows = [
>         ["Bob", 3],
>         ["Harry", 2],
>         ["James", 4],
>     ]

>     for row in rows:
>         ws.append(row)

>     chart = PieChart()
>     labels = Reference(ws, min_col=1, min_row=1, max_row=3)
>     data = Reference(ws, min_col=2, min_row=1, max_row=3)
>     chart.series = (Series(data),)
>     chart.title = "PieChart"

>     cs.add_chart(chart)

>     wb.save("demo.xlsx")

> ### Comments

> Warning

> Openpyxl currently supports the reading and writing of comment text only. Formatting information is lost. Comment dimensions are lost upon reading, but can be written. Comments are not currently supported if read_only=True is used.

> #### Adding a comment to a cell

> Comments have a text attribute and an author attribute, which must both be set

>     >>> from openpyxl import Workbook
>     >>> from openpyxl.comments import Comment
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>> comment = ws["A1"].comment
>     >>> comment = Comment('This is the comment text', 'Comment Author')
>     >>> comment.text
>     'This is the comment text'
>     >>> comment.author
>     'Comment Author'

> If you assign the same comment to multiple cells then openpyxl will automatically create copies

>     >>> from openpyxl import Workbook
>     >>> from openpyxl.comments import Comment
>     >>> wb=Workbook()
>     >>> ws=wb.active
>     >>> comment = Comment("Text", "Author")
>     >>> ws["A1"].comment = comment
>     >>> ws["B2"].comment = comment
>     >>> ws["A1"].comment is comment
>     True
>     >>> ws["B2"].comment is comment
>     False

> #### Loading and saving comments

> Comments present in a workbook when loaded are stored in the comment attribute of their respective cells automatically. Formatting information such as font size, bold and italics are lost, as are the original dimensions and position of the comment’s container box.

> Comments remaining in a workbook when it is saved are automatically saved to the workbook file.

> Comment dimensions can be specified for write-only. Comment dimension are in pixels.

>     >>> from openpyxl import Workbook
>     >>> from openpyxl.comments import Comment
>     >>> from openpyxl.utils import units
>     >>>
>     >>> wb=Workbook()
>     >>> ws=wb.active
>     >>>
>     >>> comment = Comment("Text", "Author")
>     >>> comment.width = 300
>     >>> comment.height = 50
>     >>>
>     >>> ws["A1"].comment = comment
>     >>>
>     >>> wb.save('commented_book.xlsx')

> If needed, `openpyxl.utils.units` contains helper functions for converting from other measurements such as mm or points to pixels:

>     >>> from openpyxl import Workbook
>     >>> from openpyxl.comments import Comment
>     >>> from openpyxl.utils import units
>     >>>
>     >>> wb=Workbook()
>     >>> ws=wb.active
>     >>>
>     >>> comment = Comment("Text", "Author")
>     >>> comment.width = units.points_to_pixels(300)
>     >>> comment.height = units.points_to_pixels(50)
>     >>>
>     >>> ws["A1"].comment = comment

> ### Working with styles

> #### Introduction

> Styles are used to change the look of your data while displayed on screen. They are also used to determine the formatting for numbers.

> Styles can be applied to the following aspects:

> > - font to set font size, color, underlining, etc.
> > - fill to set a pattern or color gradient
> > - border to set borders on a cell
> > - cell alignment
> > - protection

> The following are the default values

>     >>> from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font
>     >>> font = Font(name='Calibri',
>     ...                 size=11,
>     ...                 bold=False,
>     ...                 italic=False,
>     ...                 vertAlign=None,
>     ...                 underline='none',
>     ...                 strike=False,
>     ...                 color='FF000000')
>     >>> fill = PatternFill(fill_type=None,
>     ...                 start_color='FFFFFFFF',
>     ...                 end_color='FF000000')
>     >>> border = Border(left=Side(border_style=None,
>     ...                           color='FF000000'),
>     ...                 right=Side(border_style=None,
>     ...                            color='FF000000'),
>     ...                 top=Side(border_style=None,
>     ...                          color='FF000000'),
>     ...                 bottom=Side(border_style=None,
>     ...                             color='FF000000'),
>     ...                 diagonal=Side(border_style=None,
>     ...                               color='FF000000'),
>     ...                 diagonal_direction=0,
>     ...                 outline=Side(border_style=None,
>     ...                              color='FF000000'),
>     ...                 vertical=Side(border_style=None,
>     ...                               color='FF000000'),
>     ...                 horizontal=Side(border_style=None,
>     ...                                color='FF000000')
>     ...                )
>     >>> alignment=Alignment(horizontal='general',
>     ...                     vertical='bottom',
>     ...                     text_rotation=0,
>     ...                     wrap_text=False,
>     ...                     shrink_to_fit=False,
>     ...                     indent=0)
>     >>> number_format = 'General'
>     >>> protection = Protection(locked=True,
>     ...                         hidden=False)
>     >>>

> #### Cell Styles and Named Styles

> There are two types of styles: cell styles and named styles, also known as style templates.

> ##### Cell Styles

> Cell styles are shared between objects and once they have been assigned they cannot be changed. This stops unwanted side-effects such as changing the style for lots of cells when only one changes.

>     >>> from openpyxl.styles import colors
>     >>> from openpyxl.styles import Font, Color
>     >>> from openpyxl import Workbook
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> a1 = ws['A1']
>     >>> d4 = ws['D4']
>     >>> ft = Font(color="FF0000")
>     >>> a1.font = ft
>     >>> d4.font = ft
>     >>>
>     >>> a1.font.italic = True # is not allowed # doctest: +SKIP
>     >>>
>     >>> # If you want to change the color of a Font, you need to reassign it::
>     >>>
>     >>> a1.font = Font(color="FF0000", italic=True) # the change only affects A1

> #### Copying styles

> Styles can also be copied

>     >>> from openpyxl.styles import Font
>     >>> from copy import copy
>     >>>
>     >>> ft1 = Font(name='Arial', size=14)
>     >>> ft2 = copy(ft1)
>     >>> ft2.name = "Tahoma"
>     >>> ft1.name
>     'Arial'
>     >>> ft2.name
>     'Tahoma'
>     >>> ft2.size # copied from the
>     14.0

> #### Colours

> Colours for fonts, backgrounds, borders, etc. can be set in three ways: indexed, aRGB or theme. Indexed colours are the legacy implementation and the colours themselves depend upon the index provided with the workbook or with the application default. Theme colours are useful for complementary shades of colours but also depend upon the theme being present in the workbook. It is, therefore, advisable to use aRGB colours.

> ##### aRGB colours

> RGB colours are set using hexadecimal values for red, green and blue.

>     >>> from openpyxl.styles import Font
>     >>> font = Font(color="FF0000")

> The alpha value refers in theory to the transparency of the colour but this is not relevant for cell styles. The default of 00 will prepended to any simple RGB value:

>     >>> from openpyxl.styles import Font
>     >>> font = Font(color="00FF00")
>     >>> font.color.rgb
>     '0000FF00'

> There is also support for legacy indexed colours as well as themes and tints.

>     >>> from openpyxl.styles.colors import Color
>     >>> c = Color(indexed=32)
>     >>> c = Color(theme=6, tint=0.5)

> ##### Indexed Colours

> Standard Colours
> Index
> 0-4 | 00000000 | 00FFFFFF | 00FF0000 | 0000FF00 | 000000FF
> 5-9 | 00FFFF00 | 00FF00FF | 0000FFFF | 00000000 | 00FFFFFF
> 10-14 | 00FF0000 | 0000FF00 | 000000FF | 00FFFF00 | 00FF00FF
> 15-19 | 0000FFFF | 00800000 | 00008000 | 00000080 | 00808000
> 20-24 | 00800080 | 00008080 | 00C0C0C0 | 00808080 | 009999FF
> 25-29 | 00993366 | 00FFFFCC | 00CCFFFF | 00660066 | 00FF8080
> 30-34 | 000066CC | 00CCCCFF | 00000080 | 00FF00FF | 00FFFF00
> 35-39 | 0000FFFF | 00800080 | 00800000 | 00008080 | 000000FF
> 40-44 | 0000CCFF | 00CCFFFF | 00CCFFCC | 00FFFF99 | 0099CCFF
> 45-49 | 00FF99CC | 00CC99FF | 00FFCC99 | 003366FF | 0033CCCC
> 50-54 | 0099CC00 | 00FFCC00 | 00FF9900 | 00FF6600 | 00666699
> 55-60 | 00969696 | 00003366 | 00339966 | 00003300 | 00333300
> 60-63 | 00993300 | 00993366 | 00333399 | 00333333

> The indices 64 and 65 cannot be set and are reserved for the system foreground and background colours respectively.

> #### Applying Styles

> Styles are applied directly to cells

>     >>> from openpyxl.workbook import Workbook
>     >>> from openpyxl.styles import Font, Fill
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>> c = ws['A1']
>     >>> c.font = Font(size=12)

> Styles can also applied to columns and rows but note that this applies only to cells created (in Excel) after the file is closed. If you want to apply styles to entire rows and columns then you must apply the style to each cell yourself. This is a restriction of the file format:

>     >>> col = ws.column_dimensions['A']
>     >>> col.font = Font(bold=True)
>     >>> row = ws.row_dimensions[1]
>     >>> row.font = Font(underline="single")

> #### Styling Merged Cells

> The merged cell behaves similarly to other cell ojects. Its value and format is defined in its top-left cell. In order to change the border of the whole merged cell, change the border of its top-left cell. The formatting is generated for the purpose of writing.

>     >>> from openpyxl.styles import Border, Side, PatternFill, Font, GradientFill, Alignment
>     >>> from openpyxl import Workbook
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>> ws.merge_cells('B2:F4')
>     >>>
>     >>> top_left_cell = ws['B2']
>     >>> top_left_cell.value = "My Cell"
>     >>>
>     >>> thin = Side(border_style="thin", color="000000")
>     >>> double = Side(border_style="double", color="ff0000")
>     >>>
>     >>> top_left_cell.border = Border(top=double, left=thin, right=thin, bottom=double)
>     >>> top_left_cell.fill = PatternFill("solid", fgColor="DDDDDD")
>     >>> top_left_cell.fill = fill = GradientFill(stop=("000000", "FFFFFF"))
>     >>> top_left_cell.font  = Font(b=True, color="FF0000")
>     >>> top_left_cell.alignment = Alignment(horizontal="center", vertical="center")
>     >>>
>     >>> wb.save("styled.xlsx")

> #### Edit Page Setup

>     >>> from openpyxl.workbook import Workbook
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> ws.page_setup.orientation = ws.ORIENTATION_LANDSCAPE
>     >>> ws.page_setup.paperSize = ws.PAPERSIZE_TABLOID
>     >>> ws.page_setup.fitToHeight = 0
>     >>> ws.page_setup.fitToWidth = 1

> ##### Named Styles

> In contrast to Cell Styles, Named Styles are mutable. They make sense when you want to apply formatting to lots of different cells at once. NB. once you have assigned a named style to a cell, additional changes to the style will not affect the cell.

> Once a named style has been registered with a workbook, it can be referred to simply by name.

> #### Creating a Named Style

>     >>> from openpyxl.styles import NamedStyle, Font, Border, Side
>     >>> highlight = NamedStyle(name="highlight")
>     >>> highlight.font = Font(bold=True, size=20)
>     >>> bd = Side(style='thick', color="000000")
>     >>> highlight.border = Border(left=bd, top=bd, right=bd, bottom=bd)

> Once a named style has been created, it can be registered with the workbook:

>     >>> wb.add_named_style(highlight)

> But named styles will also be registered automatically the first time they are assigned to a cell:

>     >>> ws['A1'].style = highlight

> Once registered, assign the style using just the name:

>     >>> ws['D5'].style = 'highlight'

> #### Using builtin styles

> The specification includes some builtin styles which can also be used. Unfortunately, the names for these styles are stored in their localised forms. openpyxl will only recognise the English names and only exactly as written here. These are as follows:

> - ‘Normal’ # same as no style

> ##### Number formats

> - ‘Comma’
> - ‘Comma [0]’
> - ‘Currency’
> - ‘Currency [0]’
> - ‘Percent’

> ##### Informative

> - ‘Calculation’
> - ‘Total’
> - ‘Note’
> - ‘Warning Text’
> - ‘Explanatory Text’

> ##### Text styles

> - ‘Title’
> - ‘Headline 1’
> - ‘Headline 2’
> - ‘Headline 3’
> - ‘Headline 4’
> - ‘Hyperlink’
> - ‘Followed Hyperlink’
> - ‘Linked Cell’

> ##### Comparisons

> - ‘Input’
> - ‘Output’
> - ‘Check Cell’
> - ‘Good’
> - ‘Bad’
> - ‘Neutral’

> ##### Highlights

> - ‘Accent1’
> - ‘20 % - Accent1’
> - ‘40 % - Accent1’
> - ‘60 % - Accent1’
> - ‘Accent2’
> - ‘20 % - Accent2’
> - ‘40 % - Accent2’
> - ‘60 % - Accent2’
> - ‘Accent3’
> - ‘20 % - Accent3’
> - ‘40 % - Accent3’
> - ‘60 % - Accent3’
> - ‘Accent4’
> - ‘20 % - Accent4’
> - ‘40 % - Accent4’
> - ‘60 % - Accent4’
> - ‘Accent5’
> - ‘20 % - Accent5’
> - ‘40 % - Accent5’
> - ‘60 % - Accent5’
> - ‘Accent6’
> - ‘20 % - Accent6’
> - ‘40 % - Accent6’
> - ‘60 % - Accent6’
> - ‘Pandas’

> For more information about the builtin styles please refer to the `openpyxl.styles.builtins`

> ### Additional Worksheet Properties

> These are advanced properties for particular behaviours, the most used ones are the “fitTopage” page setup property and the tabColor that define the background color of the worksheet tab.

> #### Available properties for worksheets

> - “enableFormatConditionsCalculation”
> - “filterMode”
> - “published”
> - “syncHorizontal”
> - “syncRef”
> - “syncVertical”
> - “transitionEvaluation”
> - “transitionEntry”
> - “tabColor”

> #### Available fields for page setup properties

> “autoPageBreaks” “fitToPage”

> #### Available fields for outlines

> - “applyStyles”
> - “summaryBelow”
> - “summaryRight”
> - “showOutlineSymbols”

> see http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.sheetproperties%28v=office.14%29.aspx_ for details.

> Note

> By default, outline properties are intitialized so you can directly modify each of their 4 attributes, while page setup properties don’t. If you want modify the latter, you should first initialize a `openpyxl.worksheet.properties.PageSetupProperties` object with the required parameters. Once done, they can be directly modified by the routine later if needed.

>     >>> from openpyxl.workbook import Workbook
>     >>> from openpyxl.worksheet.properties import WorksheetProperties, PageSetupProperties
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> wsprops = ws.sheet_properties
>     >>> wsprops.tabColor = "1072BA"
>     >>> wsprops.filterMode = False
>     >>> wsprops.pageSetUpPr = PageSetupProperties(fitToPage=True, autoPageBreaks=False)
>     >>> wsprops.outlinePr.summaryBelow = False
>     >>> wsprops.outlinePr.applyStyles = True
>     >>> wsprops.pageSetUpPr.autoPageBreaks = True

> ### Conditional Formatting

> Excel supports three different types of conditional formatting: builtins, standard and custom. Builtins combine specific rules with predefined styles. Standard conditional formats combine specific rules with custom formatting. In additional it is possible to define custom formulae for applying custom formats using differential styles.

> Note

> The syntax for the different rules varies so much that it is not possible for openpyxl to know whether a rule makes sense or not.

> The basic syntax for creating a formatting rule is:

>     >>> from openpyxl.formatting import Rule
>     >>> from openpyxl.styles import Font, PatternFill, Border
>     >>> from openpyxl.styles.differential import DifferentialStyle
>     >>> dxf = DifferentialStyle(font=Font(bold=True), fill=PatternFill(start_color='EE1111', end_color='EE1111'))
>     >>> rule = Rule(type='cellIs', dxf=dxf, formula=["10"])

> Because the signatures for some rules can be quite verbose there are also some convenience factories for creating them.

> #### Builtin formats

> The builtins conditional formats are:

> > - ColorScale
> > - IconSet
> > - DataBar

> Builtin formats contain a sequence of formatting settings which combine a type with an integer for comparison. Possible types are: ‘num’, ‘percent’, ‘max’, ‘min’, ‘formula’, ‘percentile’.

> ##### ColorScale

> You can have color scales with 2 or 3 colors. 2 color scales produce a gradient from one color to another; 3 color scales use an additional color for 2 gradients.

> The full syntax for creating a ColorScale rule is:

>     >>> from openpyxl.formatting.rule import ColorScale, FormatObject
>     >>> from openpyxl.styles import Color
>     >>> first = FormatObject(type='min')
>     >>> last = FormatObject(type='max')
>     >>> # colors match the format objects:
>     >>> colors = [Color('AA0000'), Color('00AA00')]
>     >>> cs2 = ColorScale(cfvo=[first, last], color=colors)
>     >>> # a three color scale would extend the sequences
>     >>> mid = FormatObject(type='num', val=40)
>     >>> colors.insert(1, Color('00AA00'))
>     >>> cs3 = ColorScale(cfvo=[first, mid, last], color=colors)
>     >>> # create a rule with the color scale
>     >>> from openpyxl.formatting.rule import Rule
>     >>> rule = Rule(type='colorScale', colorScale=cs3)

> There is a convenience function for creating ColorScale rules

>     >>> from openpyxl.formatting.rule import ColorScaleRule
>     >>> rule = ColorScaleRule(start_type='percentile', start_value=10, start_color='FFAA0000',
>     ...                       mid_type='percentile', mid_value=50, mid_color='FF0000AA',
>     ...                       end_type='percentile', end_value=90, end_color='FF00AA00')

> ##### IconSet

> Choose from the following set of icons: ‘3Arrows’, ‘3ArrowsGray’, ‘3Flags’, ‘3TrafficLights1’, ‘3TrafficLights2’, ‘3Signs’, ‘3Symbols’, ‘3Symbols2’, ‘4Arrows’, ‘4ArrowsGray’, ‘4RedToBlack’, ‘4Rating’, ‘4TrafficLights’, ‘5Arrows’, ‘5ArrowsGray’, ‘5Rating’, ‘5Quarters’

> The full syntax for creating an IconSet rule is:

>     >>> from openpyxl.formatting.rule import IconSet, FormatObject
>     >>> first = FormatObject(type='percent', val=0)
>     >>> second = FormatObject(type='percent', val=33)
>     >>> third = FormatObject(type='percent', val=67)
>     >>> iconset = IconSet(iconSet='3TrafficLights1', cfvo=[first, second, third], showValue=None, percent=None, reverse=None)
>     >>> # assign the icon set to a rule
>     >>> from openpyxl.formatting.rule import Rule
>     >>> rule = Rule(type='iconSet', iconSet=iconset)

> There is a convenience function for creating IconSet rules:

>     >>> from openpyxl.formatting.rule import IconSetRule
>     >>> rule = IconSetRule('5Arrows', 'percent', [10, 20, 30, 40, 50], showValue=None, percent=None, reverse=None)

> ##### DataBar

> Currently, openpyxl supports the DataBars as defined in the original specification. Borders and directions were added in a later extension.

> The full syntax for creating a DataBar rule is:

>     >>> from openpyxl.formatting.rule import DataBar, FormatObject
>     >>> first = FormatObject(type='min')
>     >>> second = FormatObject(type='max')
>     >>> data_bar = DataBar(cfvo=[first, second], color="638EC6", showValue=None, minLength=None, maxLength=None)
>     >>> # assign the data bar to a rule
>     >>> from openpyxl.formatting.rule import Rule
>     >>> rule = Rule(type='dataBar', dataBar=data_bar)

> There is a convenience function for creating DataBar rules:

>     >>> from openpyxl.formatting.rule import DataBarRule
>     >>> rule = DataBarRule(start_type='percentile', start_value=10, end_type='percentile', end_value='90',
>     ...                    color="FF638EC6", showValue="None", minLength=None, maxLength=None)

> #### Standard conditional formats

> The standard conditional formats are:

> > - Average
> > - Percent
> > - Unique or duplicate
> > - Value
> > - Rank

>     >>> from openpyxl import Workbook
>     >>> from openpyxl.styles import Color, PatternFill, Font, Border
>     >>> from openpyxl.styles.differential import DifferentialStyle
>     >>> from openpyxl.formatting.rule import ColorScaleRule, CellIsRule, FormulaRule
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> # Create fill
>     >>> redFill = PatternFill(start_color='EE1111',
>     ...                end_color='EE1111',
>     ...                fill_type='solid')
>     >>>
>     >>> # Add a two-color scale
>     >>> # Takes colors in excel 'RRGGBB' style.
>     >>> ws.conditional_formatting.add('A1:A10',
>     ...             ColorScaleRule(start_type='min', start_color='AA0000',
>     ...                           end_type='max', end_color='00AA00')
>     ...                           )
>     >>>
>     >>> # Add a three-color scale
>     >>> ws.conditional_formatting.add('B1:B10',
>     ...                ColorScaleRule(start_type='percentile', start_value=10, start_color='AA0000',
>     ...                            mid_type='percentile', mid_value=50, mid_color='0000AA',
>     ...                            end_type='percentile', end_value=90, end_color='00AA00')
>     ...                              )
>     >>>
>     >>> # Add a conditional formatting based on a cell comparison
>     >>> # addCellIs(range_string, operator, formula, stopIfTrue, wb, font, border, fill)
>     >>> # Format if cell is less than 'formula'
>     >>> ws.conditional_formatting.add('C2:C10',
>     ...             CellIsRule(operator='lessThan', formula=['C$1'], stopIfTrue=True, fill=redFill))
>     >>>
>     >>> # Format if cell is between 'formula'
>     >>> ws.conditional_formatting.add('D2:D10',
>     ...             CellIsRule(operator='between', formula=['1','5'], stopIfTrue=True, fill=redFill))
>     >>>
>     >>> # Format using a formula
>     >>> ws.conditional_formatting.add('E1:E10',
>     ...             FormulaRule(formula=['ISBLANK(E1)'], stopIfTrue=True, fill=redFill))
>     >>>
>     >>> # Aside from the 2-color and 3-color scales, format rules take fonts, borders and fills for styling:
>     >>> myFont = Font()
>     >>> myBorder = Border()
>     >>> ws.conditional_formatting.add('E1:E10',
>     ...             FormulaRule(formula=['E1=0'], font=myFont, border=myBorder, fill=redFill))
>     >>>
>     >>> # Highlight cells that contain particular text by using a special formula
>     >>> red_text = Font(color="9C0006")
>     >>> red_fill = PatternFill(bgColor="FFC7CE")
>     >>> dxf = DifferentialStyle(font=red_text, fill=red_fill)
>     >>> rule = Rule(type="containsText", operator="containsText", text="highlight", dxf=dxf)
>     >>> rule.formula = ['NOT(ISERROR(SEARCH("highlight",A1)))']
>     >>> ws.conditional_formatting.add('A1:F40', rule)
>     >>> wb.save("test.xlsx")

> #### Formatting Entire Rows

> Sometimes you want to apply a conditional format to more than one cell, say a row of cells which contain a particular value.

>     >>> ws.append(['Software', 'Developer', 'Version'])
>     >>> ws.append(['Excel', 'Microsoft', '2016'])
>     >>> ws.append(['openpyxl', 'Open source', '2.6'])
>     >>> ws.append(['OpenOffice', 'Apache', '4.1.4'])
>     >>> ws.append(['Word', 'Microsoft', '2010'])

> We want to higlight the rows where the developer is Microsoft. We do this by creating an expression rule and using a formula to identify which rows contain software developed by Microsoft.

>     >>> red_fill = PatternFill(bgColor="FFC7CE")
>     >>> dxf = DifferentialStyle(fill=red_fill)
>     >>> r = Rule(type="expression", dxf=dxf, stopIfTrue=True)
>     >>> r.formula = ['$A2="Microsoft"']
>     >>> ws.conditional_formatting.add("A1:C10", r)

> Note

> The formula uses an absolute reference to the column referred to, `B` in this case; but a relative row number, in this case `1` to the range over which the format is applied. It can be tricky to get this right but the rule can be adjusted even after it has been added to the worksheet’s condidtional format collection.

> ### Pivot Tables

> openpyxl provides read-support for pivot tables so that they will be preserved in existing files. The specification for pivot tables, while extensive, is not very clear and it is not intended that client code should be able to create pivot tables. However, it should be possible to edit and manipulate existing pivot tables, eg. change their ranges or whether they should update automatically settings.

> As is the case for charts, images and tables there is currently no management API for pivot tables so that client code will have to loop over the `_pivots` list of a worksheet.

> #### Example

>     from openpyxl import load_workbook
>     wb = load_workbook("campaign.xlsx")
>     ws = wb["Results"]
>     pivot = ws._pivots[0] # any will do as they share the same cache
>     pivot.cache.refreshOnLoad = True

> For further information see `openpyxl.pivot.cache.CacheDefinition`

> ### Print Settings

> openpyxl provides reasonably full support for print settings.

> #### Edit Print Options

>     >>> from openpyxl.workbook import Workbook
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> ws.print_options.horizontalCentered = True
>     >>> ws.print_options.verticalCentered = True

> #### Headers and Footers

> Headers and footers use their own formatting language. This is fully supported when writing them but, due to the complexity and the possibility of nesting, only partially when reading them. There is support for the font, size and color for a left, centre/center, or right element. Granular control (highlighting individuals words) will require applying control codes manually.

>     >>> from openpyxl.workbook import Workbook
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> ws.oddHeader.left.text = "Page &[Page] of &N"
>     >>> ws.oddHeader.left.size = 14
>     >>> ws.oddHeader.left.font = "Tahoma,Bold"
>     >>> ws.oddHeader.left.color = "CC3366"

> Also supported are evenHeader and evenFooter as well as firstHeader and firstFooter.

> #### Add Print Titles

> You can print titles on every page to ensure that the data is properly labelled.

>     >>> from openpyxl.workbook import Workbook
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> ws.print_title_cols = 'A:B' # the first two cols
>     >>> ws.print_title_rows = '1:1' # the first row

> #### Add a Print Area

> You can select a part of a worksheet as the only part that you want to print

>     >>> from openpyxl.workbook import Workbook
>     >>>
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> ws.print_area = 'A1:F10'

> ### Using filters and sorts

> It’s possible to add a filter to a worksheet.

> Note

> Filters and sorts can only be configured by openpyxl but will need to be applied in applications like Excel. This is because they actually rearranges or format cells or rows in the range.

> To add a filter you define a range and then add columns and sort conditions:

>     from openpyxl import Workbook

>     wb = Workbook()
>     ws = wb.active

>     data = [
>         ["Fruit", "Quantity"],
>         ["Kiwi", 3],
>         ["Grape", 15],
>         ["Apple", 3],
>         ["Peach", 3],
>         ["Pomegranate", 3],
>         ["Pear", 3],
>         ["Tangerine", 3],
>         ["Blueberry", 3],
>         ["Mango", 3],
>         ["Watermelon", 3],
>         ["Blackberry", 3],
>         ["Orange", 3],
>         ["Raspberry", 3],
>         ["Banana", 3]
>     ]

>     for r in data:
>         ws.append(r)

>     ws.auto_filter.ref = "A1:B15"
>     ws.auto_filter.add_filter_column(0, ["Kiwi", "Apple", "Mango"])
>     ws.auto_filter.add_sort_condition("B2:B15")

>     wb.save("filtered.xlsx")

> This will add the relevant instructions to the file but will neither actually filter nor sort.

> ### Validating cells

> Data validators can be applied to ranges of cells but are not enforced or evaluated. Ranges do not have to be contiguous: eg. “A1 B2:B5” is contains A1 and the cells B2 to B5 but not A2 or B2.

> #### Examples

>     >>> from openpyxl import Workbook
>     >>> from openpyxl.worksheet.datavalidation import DataValidation
>     >>>
>     >>> # Create the workbook and worksheet we'll be working with
>     >>> wb = Workbook()
>     >>> ws = wb.active
>     >>>
>     >>> # Create a data-validation object with list validation
>     >>> dv = DataValidation(type="list", formula1='"Dog,Cat,Bat"', allow_blank=True)
>     >>>
>     >>> # Optionally set a custom error message
>     >>> dv.error ='Your entry is not in the list'
>     >>> dv.errorTitle = 'Invalid Entry'
>     >>>
>     >>> # Optionally set a custom prompt message
>     >>> dv.prompt = 'Please select from the list'
>     >>> dv.promptTitle = 'List Selection'
>     >>>
>     >>> # Add the data-validation object to the worksheet
>     >>> ws.add_data_validation(dv)

>     >>> # Create some cells, and add them to the data-validation object
>     >>> c1 = ws["A1"]
>     >>> c1.value = "Dog"
>     >>> dv.add(c1)
>     >>> c2 = ws["A2"]
>     >>> c2.value = "An invalid value"
>     >>> dv.add(c2)
>     >>>
>     >>> # Or, apply the validation to a range of cells
>     >>> dv.add('B1:B1048576') # This is the same as for the whole of column B
>     >>>
>     >>> # Check with a cell is in the validator
>     >>> "B4" in dv
>     True

> Note

> Validations without any cell ranges will be ignored when saving a workbook.

> #### Other validation examples

> Any whole number:

>     dv = DataValidation(type="whole")

> Any whole number above 100:

>     dv = DataValidation(type="whole",
>                         operator="greaterThan",
>                         formula1=100)

> Any decimal number:

>     dv = DataValidation(type="decimal")

> Any decimal number between 0 and 1:

>     dv = DataValidation(type="decimal",
>                         operator="between",
>                         formula1=0,
>                         formula2=1)

> Any date:

>     dv = DataValidation(type="date")

> or time:

>     dv = DataValidation(type="time")

> Any string at most 15 characters:

>     dv = DataValidation(type="textLength",
>                         operator="lessThanOrEqual"),
>                         formula1=15)

> Cell range validation:

>     from openpyxl.utils import quote_sheetname
>     dv = DataValidation(type="list",
>                         formula1="{0}!$B$1:$B$10".format(quote_sheetname(sheetname))
>                         )

> Custom rule:

>     dv = DataValidation(type="custom",
>                         formula1"=SOMEFORMULA")

> Note

> See http://www.contextures.com/xlDataVal07.html for custom rules

> ### Defined Names

> The specification has the following to say about defined names:

> > “Defined names are descriptive text that is used to represents a cell, range of cells, formula, or constant value.”

> This means they are very loosely defined. They might contain a constant, a formula, a single cell reference, a range of cells or multiple ranges of cells across different worksheets. Or all of the above. They are defined globally for a workbook and accessed from the defined_names attribute.

> #### Sample use for ranges

> Accessing a range called “my_range”:

>     my_range = wb.defined_names['my_range']
>     # if this contains a range of cells then the destinations attribute is not None
>     dests = my_range.destinations # returns a generator of (worksheet title, cell range) tuples

>     cells = []
>     for title, coord in dests:
>         ws = wb[title]
>         cells.append(ws[coord])

> #### Creating new named ranges

>     import openpyxl
>     wb = openpyxl.Workbook()
>     new_range = openpyxl.workbook.defined_name.DefinedName('newrange', attr_text='Sheet!$A$1:$A$5')
>     wb.defined_names.append(new_range)

>     # create a local named range (only valid for a specific sheet)
>     sheetid = wb.sheetnames.index('Sheet')
>     private_range = openpyxl.workbook.defined_name.DefinedName('privaterange', attr_text='Sheet!$A$6', localSheetId=sheetid)
>     wb.defined_names.append(private_range)
>     # this local range can't be retrieved from the global defined names
>     assert('privaterange' not in wb.defined_names)

>     # the scope has to be supplied to retrieve local ranges:
>     print(wb.defined_names.localnames(sheetid))
>     print(wb.defined_names.get('privaterange', sheetid).attr_text)

>     ['privaterange']
>     Sheet!$A$6

> ### Worksheet Tables

> Worksheet tables are references to groups of cells. This makes certain operations such as styling the cells in a table easier.

> #### Creating a table

>     from openpyxl import Workbook
>     from openpyxl.worksheet.table import Table, TableStyleInfo

>     wb = Workbook()
>     ws = wb.active

>     data = [
>         ['Apples', 10000, 5000, 8000, 6000],
>         ['Pears',   2000, 3000, 4000, 5000],
>         ['Bananas', 6000, 6000, 6500, 6000],
>         ['Oranges',  500,  300,  200,  700],
>     ]

>     # add column headings. NB. these must be strings
>     ws.append(["Fruit", "2011", "2012", "2013", "2014"])
>     for row in data:
>         ws.append(row)

>     tab = Table(displayName="Table1", ref="A1:E5")

>     # Add a default style with striped rows and banded columns
>     style = TableStyleInfo(name="TableStyleMedium9", showFirstColumn=False,
>                            showLastColumn=False, showRowStripes=True, showColumnStripes=True)
>     tab.tableStyleInfo = style

>     '''
>     Table must be added using ws.add_table() method to avoid duplicate names.
>     Using this method ensures table name is unque through out defined names and all other table name.
>     '''
>     ws.add_table(tab)
>     wb.save("table.xlsx")

> Table names must be unique within a workbook. By default tables are created with a header from the first row and filters for all the columns and table headers and column headings must always contain strings.

> Warning

> In write-only mode you must add column headings to tables manually and the values must always be the same as the values of the corresponding cells (ee below for an example of how to do this), otherwise Excel may consider the file invalid and remove the table.

> Styles are managed using the the TableStyleInfo object. This allows you to stripe rows or columns and apply the different colour schemes.

> #### Working with Tables

> `ws.tables` is a dictionary-like object of all the tables in a particular worksheet:

>     >>> ws.tables
>     {"Table1",  <openpyxl.worksheet.table.Table object>}

> ##### Get Table by name or range

>     >>> ws.tables["Table1"]
>     or
>     >>> ws.tables["A1:D10"]

> ##### Iterate through all tables in a worksheet

>     >>> for table in ws.tables.values():
>     >>>    print(table)

> ##### Get table name and range of all tables in a worksheet

> Returns a list of table name and their ranges.

>     >>> ws.tables.items()
>     >>> [("Table1", "A1:D10")]

> ##### Delete a table

>     >>> del ws.tables["Table1"]

> ##### The number of tables in a worksheet

>     >>> len(ws.tables)
>     >>> 1

> #### Manually adding column headings

> In write-only mode you can either only add tables without headings:

>     >>> table.headerRowCount = False

> Or initialise the column headings manually:

>     >>> headings = ["Fruit", "2011", "2012", "2013", "2014"] # all values must be strings
>     >>> table._initialise_columns()
>     >>> for column, value in zip(table.tableColumns, headings):
>         column.name = value

> ### Parsing Formulas

> openpyxl supports limited parsing of formulas embedded in cells. The openpyxl.formula package contains a Tokenizer class to break formulas into their consitutuent tokens. Usage is as follows:

>     >>> from openpyxl.formula import Tokenizer
>     >>> tok = Tokenizer("""=IF($A$1,"then True",MAX(DEFAULT_VAL,'Sheet 2'!B1))""")
>     >>> print("\n".join("%12s%11s%9s" % (t.value, t.type, t.subtype) for t in tok.items))
>              IF(       FUNC     OPEN
>             $A$1    OPERAND    RANGE
>                ,        SEP      ARG
>      "then True"    OPERAND     TEXT
>                ,        SEP      ARG
>             MAX(       FUNC     OPEN
>      DEFAULT_VAL    OPERAND    RANGE
>                ,        SEP      ARG
>     'Sheet 2'!B1    OPERAND    RANGE
>                )       FUNC    CLOSE
>                )       FUNC    CLOSE

> As shown above, tokens have three attributes of interest:

> - `.value`: The substring of the formula that produced this token
> - `.type`: The type of token this represents. Can be one of
>   - `Token.LITERAL`: If the cell does not contain a formula, its value is represented by a single `LITERAL` token.
>   - `Token.OPERAND`: A generic term for any value in the Excel formula. (See `.subtype` below for more details).
>   - `Token.FUNC`: Function calls are broken up into tokens for the opener (e.g., `SUM(`), followed by the arguments, followed by the closer (i.e., `)`). The function name and opening parenthesis together form one `FUNC` token, and the matching parenthesis forms another `FUNC` token.
>   - `Token.ARRAY`: Array literals (enclosed between curly braces) get two `ARRAY` tokens each, one for the opening `{` and one for the closing `}`.
>   - `Token.PAREN`: When used for grouping subexpressions (and not to denote function calls), parentheses are tokenized as `PAREN` tokens (one per character).
>   - `Token.SEP`: These tokens are created from either commas (`,`) or semicolons (`;`). Commas create `SEP` tokens when they are used to separate function arguments (e.g., `SUM(a,b)`) or when they are used to separate array elements (e.g., `{a,b}`). (They have another use as an infix operator for joining ranges). Semicolons are always used to separate rows in an array literal, so always create `SEP` tokens.
>   - `Token.OP_PRE`: Designates a prefix unary operator. Its value is always `+` or `-`
>   - `Token.OP_IN`: Designates an infix binary operator. Possible values are `>=`, `<=`, `<>`, `=`, `>`, `<`, `*`, `/`, `+`, `-`, `^`, or `&`.
>   - `Token.OP_POST`: Designates a postfix unary operator. Its value is always `%`.
>   - `Token.WSPACE`: Created for any whitespace encountered. Its value is always a single space, regardless of how much whitespace is found.
> - `.subtype`: Some of the token types above use the subtype to provide additional information about the token. Possible subtypes are:
>   - `Token.TEXT`, `Token.NUMBER`, `Token.LOGICAL`, `Token.ERROR`, `Token.RANGE`: these subtypes describe the various forms of `OPERAND` found in formulae. `LOGICAL` is either `TRUE` or `FALSE`, `RANGE` is either a named range or a direct reference to another range. `TEXT`, `NUMBER`, and `ERROR` all refer to literal values in the formula
>   - `Token.OPEN` and `Token.CLOSE`: these two subtypes are used by `PAREN`, `FUNC`, and `ARRAY`, to describe whether the token is opening a new subexpression or closing it.
>   - `Token.ARG` and `Token.ROW`: are used by the `SEP` tokens, to distinguish between the comma and semicolon. Commas produce tokens of subtype `ARG` whereas semicolons produce tokens of subtype `ROW`

> #### Translating formulae from one location to another

> It is possible to translate (in the mathematical sense) formulae from one location to another using the `openpyxl.formulas.translate.Translator` class. For example, there a range of cells `B2:E7` with a sum of each row in column `F`:

>     >>> from openpyxl.formula.translate import Translator
>     >>> ws['F2'] = "=SUM(B2:E2)"
>     >>> # move the formula one colum to the right
>     >>> ws['G2'] = Translator("=SUM(B2:E2)", origin="F2").translate_formula("G2")
>     >>> ws['G2'].value
>     '=SUM(C2:F2)'

> Note

> This is limited to the same general restrictions of formulae: A1 cell-references only and no support for defined names.

> ### Dates and Times

> Dates and times can be stored in two distinct ways in XLSX files: as an ISO 8601 formatted string or as a single number. openpyxl supports both representations and translates between them and Python’s datetime module representations when reading from and writing to files. In either representation, the maximum date and time precision in XLSX files is millisecond precision.

> XLSX files are not suitable for storing historic dates (before 1900), due to bugs in Excel that cannot be fixed without causing backward compatibility problems. To discourage users from trying anyway, Excel deliberately refuses to recognize and display such dates. Consequently, it is not advised to use openpyxl for such purposes either, especially when exchanging files with others.

> #### Timezones

> The date and time representations in Excel do not support timezones, therefore openpyxl can only deal with naive datetime/time objects. Any timezone information attached to Python datetimes must be stripped off by the user before datetimes can be stored in XLSX files.

> #### Using the ISO 8601 format

> To make openpyxl store dates and times in the ISO 8601 format on writing your file, set the workbook’s `iso_dates` flag to `True`:

>     >>> import openpyxl
>     >>> wb = openpyxl.Workbook()
>     >>> wb.iso_dates = True

> The benefit of using this format is that the meaning of the stored information is not subject to interpretation, as it is with the single number format [1].

> The Office Open XML standard does not specify a supported subset of the ISO 8601 duration format for representing time interval durations. openpyxl therefore always uses the single number format for timedelta values when writing them to file.

> #### The 1900 and 1904 date systems

> The ‘date system’ of an XLSX file determines how dates and times in the single number representation are interpreted. XLSX files always use one of two possible date systems:

> > - In the 1900 date system (the default), the reference date (with number 1) is 1900-01-01.
> > - In the 1904 date system, the reference date (with number 0) is 1904-01-01.

> Complications arise not only from the different start numbers of the reference dates, but also from the fact that the 1900 date system has a built-in (but wrong) assumption that the year 1900 had been a leap year. Excel deliberately refuses to recognize and display dates before the reference date correctly, in order to discourage people from storing historical data.

> More information on this issue is available from Microsoft:
>   - https://docs.microsoft.com/en-us/office/troubleshoot/excel/1900-and-1904-date-system
>   - https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year

> In workbooks using the 1900 date system, openpyxl behaves the same as Excel when translating between the worksheets’ date/time numbers and Python datetimes in January and February 1900. The only exception is 29 February 1900, which cannot be represented as a Python datetime object since it is not a valid date.

> You can get the date system of a workbook like this:

>     >>> import openpyxl
>     >>> wb = openpyxl.Workbook()
>     >>> if wb.epoch == openpyxl.utils.datetime.CALENDAR_WINDOWS_1900:
>     ...     print("This workbook is using the 1900 date system.")
>     ...
>     This workbook is using the 1900 date system.

> and set it like this:

>     >>> wb.epoch = openpyxl.utils.datetime.CALENDAR_MAC_1904

> #### Handling timedelta values

> Excel users can use number formats resembling `[h]:mm:ss` or `[mm]:ss` to display time interval durations, which openpyxl considers to be equivalent to timedeltas in Python. openpyxl recognizes these number formats when reading XLSX files and returns datetime.timedelta values for the corresponding cells.

> When writing timedelta values from worksheet cells to file, openpyxl uses the `[h]:mm:ss` number format for these cells.

> Footnotes

> [1] | For example, the serial 1 in an Excel worksheet can be interpreted as 00:00, as 24:00, as 1900-01-01, as 1440 (minutes), etc., depending solely on the formatting applied.

> ### Protection

> Warning

> Password protecting a workbook or worksheet only provides a quite basic level of security. The data is not encrypted, so can be modified by any number of freely available tools. In fact the specification states: “Worksheet or workbook element protection should not be confused with file security. It is meant to make your workbook safe from unintentional modification, and cannot protect it from malicious modification.”

> Openpyxl provides support for protecting a workbook and worksheet from modification. The Open XML “Legacy Password Hash Algorithm” is used to generate hashed password values unless another algorithm is explicitly configured.

> #### Workbook Protection

> To prevent other users from viewing hidden worksheets, adding, moving, deleting, or hiding worksheets, and renaming worksheets, you can protect the structure of your workbook with a password. The password can be set using the `openpyxl.workbook.protection.WorkbookProtection.workbookPassword()` property

>     >>> wb.security.workbookPassword = '...'
>     >>> wb.security.lockStructure = True

> Similarly removing change tracking and change history from a shared workbook can be prevented by setting another password. This password can be set using the `openpyxl.workbook.protection.WorkbookProtection.revisionsPassword()` property

>     >>> wb.security.revisionsPassword = '...'

> Other properties on the `openpyxl.workbook.protection.WorkbookProtection` object control exactly what restrictions are in place, but these will only be enforced if the appropriate password is set.

> Specific setter functions are provided if you need to set the raw password value without using the default hashing algorithm - e.g.

>     hashed_password = ...
>     wb.security.set_workbook_password(hashed_password, already_hashed=True)

> #### Worksheet Protection

> Various aspects of a worksheet can also be locked by setting attributes on the `openpyxl.worksheet.protection.SheetProtection` object. Unlike workbook protection, sheet protection may be enabled with or without using a password. Sheet protection is enabled using the `openpxyl.worksheet.protection.SheetProtection.sheet` attribute or calling enable() or disable():

>     >>> ws = wb.active
>     >>> ws.protection.sheet = True
>     >>> ws.protection.enable()
>     >>> ws.protection.disable()

> If no password is specified, users can disable configured sheet protection without specifying a password. Otherwise they must supply a password to change configured protections. The password is set using the `openpxyl.worksheet.protection.SheetProtection.password()` property

>     >>> ws = wb.active
>     >>> ws.protection.password = '...'

## Information for Developers

> ### Development

> If you find the openpyxl project intriguing and want to contribute a new awesome feature, fix a nasty bug or improve the documentation this section will guide you in setting up your development environment.

> We will look into the coding standards and version control system workflows used, as well as cloning the openpyxl code to your local machine, setting up a virtual Python environment, running tests and building the documentation.

> #### Getting the source

> The source code of openpyxl is hosted on Heptapod as a Mercurial project which you can download using e.g. the GUI client SourceTree by Atlassian. If you prefer working with the command line you can use the following:

>     $ hg clone https://foss.heptapod.net/openpyxl/openpyxl
>     $ hg up 3.0

> Please note that the default branch should never be used for development work. For bug fixes and minor patches you should base your work on the branch of the current release, e.g 3.0. New features should generally be based on the development branch of the next minor version. If in doubt get in touch with the openpyxl development team.

> It is worthwhile to add an upstream remote reference to the original repository to update your fork with the latest changes, by adding to the `./hg/hgrc` file the following:

>     [paths]
>     default = ...
>     openpyxl-master = https://foss.heptapod.net/openpyxl/openpyxl

> You can then grab any new changes using:

>     $ hg pull openpyxl-master

> After that you should create a virtual environment using `virtualenv` and install the project requirements and the project itself:

>     $ cd openpyxl
>     $ virtualenv openpyxl-env

> Activate the environment using:

>     $ source bin/activate  # or ./openpyxl-env/Scripts/activate on Windows

> Install the dev and prod dependencies and the package itself using:

>     (openpyxl-env) $ pip install -U -r requirements.txt
>     (openpyxl-env) $ pip install -e .

> #### Running tests

> Note that contributions to the project without tests will not be accepted.

> We use `pytest` as the test runner with `pytest-cov` for coverage information and `pytest-flakes` for static code analysis.

> To run all the tests you need to either execute:

>     (openpxyl-env) $ pytest -xrf openpyxl  # the flags will stop testing at the first error

> Or use `tox` to run the tests on different Python versions and configurations:

>     $ tox openpyxl

> ##### Coverage

> The goal is 100 % coverage for unit tests - data types and utility functions. Coverage information can be obtained using:

>     py.test --cov openpyxl

> ##### Organisation

> Tests should be preferably at package / module level e.g `openpyxl/cell`. This makes testing and getting statistics for code under development easier:

>     py.test --cov openpyxl/cell openpyxl/cell

> ##### Checking XML

> Use the `openpyxl.tests.helper.compare_xml` function to compare generated and expected fragments of XML.

> ##### Schema validation

> When working on code to generate XML it is possible to validate that the generated XML conforms to the published specification. Note, this won’t necessarily guarantee that everything is fine but is preferable to reverse engineering!

> ##### Microsoft Tools

> Along with the SDK, Microsoft also has a “Productivity Tool” for working with Office OpenXML.

> This allows you to quickly inspect or compare whole Excel files. Unfortunately, validation errors contain many false positives. The tool also contain links to the specification and implementers’ notes.

> #### File Support and Specifications

> The primary aim of openpyxl is to support reading and writing Microsoft Excel 2010 files. These are zipped OOXML files that are specified by ECMA 376 and ISO 29500.

> Where possible we try to support files generated by other libraries or programs, but can’t guarantee it, because often these do not strictly adhere to the above format.

> #### Support of Python Versions

> Python 3.6 and upwards are supported

> #### Coding style

> We orient ourselves at PEP-8 for the coding style, except when implementing attributes for roundtripping. Despite that you are encouraged to use Python data conventions (boolean, None, etc.). Note exceptions from this convestion in docstrings.

> #### Contributing

> Contributions in the form of pull requests are always welcome. Don’t forget to add yourself to the list of authors!

> #### Branch naming convention

> We use a “major.minor.patch” numbering system, ie. 3.0.10. Development branches are named after “major.minor” releases. In general, API change will only happen major releases but there will be exceptions. Always communicate API changes to the mailing list before making them. If you are changing an API try and an implement a fallback (with deprecation warning) for the old behaviour.

> The “default branch” is used for releases and always has changes from a development branch merged in. It should never be the target for a pull request.

> #### Pull Requests

> Pull requests should be submitted to the current, unreleased development branch. Eg. if the current release is 3.0.10, pull requests should be made to the 3.0 branch. Exceptions are bug fixes to released versions which should be made to the relevant release branch and merged upstream into development.

> Please use `tox` to test code for different submissions before making a pull request. This is especially important for picking up problems across Python versions.

> ##### Documentation

> Remember to update the documentation when adding or changing features. Check that documentation is syntactically correct.:

>     tox -e doc

> #### Benchmarking

> Benchmarking and profiling are ongoing tasks. Contributions to these are very welcome as we know there is a lot to do.

> ##### Memory Use

> There is a tox profile for long-running memory benchmarks using the memory_utils package.:

>     tox -e memory

> ##### Pympler

> As openpyxl does not include any internal memory benchmarking tools, the python pympler package was used during the testing of styles to profile the memory usage in `openpyxl.reader.excel.read_style_table()`:

>     # in openpyxl/reader/style.py
>     from pympler import muppy, summary

>     def read_style_table(xml_source):
>       ...
>       if cell_xfs is not None:  # ~ line 47
>           initialState = summary.summarize(muppy.get_objects())  # Capture the initial state
>           for index, cell_xfs_node in enumerate(cell_xfs_nodes):
>              ...
>              table[index] = new_style
>           finalState = summary.summarize(muppy.get_objects())  # Capture the final state
>           diff = summary.get_diff(initialState, finalState)  # Compare
>           summary.print_(diff)

> `pympler.summary.print_()` prints to the console a report of object memory usage, allowing the comparison of different methods and examination of memory usage. A useful future development would be to construct a benchmarking package to measure the performance of different components.

## API Documentation

### Key Classes

- `openpyxl.workbook.workbook.Workbook`
- `openpyxl.worksheet.worksheet.Worksheet`
- `openpyxl.cell.cell.Cell`

### Full API

#### openpyxl package

##### Subpackages

###### openpyxl.cell package

Submodules
openpyxl.cell.cell module

Manage individual cells in a spreadsheet.

The Cell class is required to know its value and type, display options, and any other features of an Excel cell. Utilities for referencing cells using Excel’s ‘A1’ column/row nomenclature are also provided.

class `openpyxl.cell.cell.``Cell`(worksheet, row=None, column=None, value=None, style_array=None)

  Bases: `openpyxl.styles.styleable.StyleableObject`

  Describes cell associated properties.

  Properties of interest include style, type, value, and address.

  `base_date`
  `check_error`(value)

    Tries to convert Error” else N/A

  `check_string`(value)

    Check string coding, length, and line break character

  `col_idx`

    The numerical index of the column

  `column`

    Column number of this cell (1-based)

  `column_letter`
  `comment`

    Returns the comment associated with this cell

    Type: | `openpyxl.comments.Comment`

  `coordinate`

    This cell’s coordinate (ex. ‘A5’)

  `data_type`
  `encoding`
  `hyperlink`

    Return the hyperlink target or an empty string

  `internal_value`

    Always returns the value for excel.

  `is_date`

    True if the value is formatted as a date

    Type: | bool

  `offset`(row=0, column=0)

    Returns a cell location relative to this cell.

    Parameters: | row (int) – number of rows to offset column (int) – number of columns to offset
    Return type: | `openpyxl.cell.Cell`

  `parent`
  `row`

    Row number of this cell (1-based)

  `value`

    Get or set the value held in the cell.

    Type: | depends on the value (string, float, int or `datetime.datetime`)

class `openpyxl.cell.cell.``MergedCell`(worksheet, row=None, column=None)

  Bases: `openpyxl.styles.styleable.StyleableObject`

  Describes the properties of a cell in a merged cell and helps to display the borders of the merged cell.

  The value of a MergedCell is always None.

  `column`
  `comment` = None
  `coordinate`

    This cell’s coordinate (ex. ‘A5’)

  `data_type` = 'n'
  `hyperlink` = None
  `row`
  `value` = None

`openpyxl.cell.cell.``WriteOnlyCell`(ws=None, value=None)

`openpyxl.cell.cell.``get_time_format`(t)

`openpyxl.cell.cell.``get_type`(t, value)

openpyxl.cell.read_only module

class `openpyxl.cell.read_only.``EmptyCell`

  Bases: `object`

  `alignment` = None
  `border` = None
  `data_type` = 'n'
  `fill` = None
  `font` = None
  `is_date` = False
  `number_format` = None
  `value` = None

class `openpyxl.cell.read_only.``ReadOnlyCell`(sheet, row, column, value, data_type='n', style_id=0)

  Bases: `object`

  `alignment`
  `border`
  `column`
  `column_letter`
  `coordinate`
  `data_type`
  `fill`
  `font`
  `has_style`
  `internal_value`
  `is_date`
  `number_format`
  `parent`
  `protection`
  `row`
  `style_array`
  `value`

openpyxl.cell.text module

Richtext definition

class `openpyxl.cell.text.``InlineFont`(rFont=None, charset=None, family=None, b=None, i=None, strike=None, outline=None, shadow=None, condense=None, extend=None, color=None, sz=None, u=None, vertAlign=None, scheme=None)

  Bases: `openpyxl.styles.fonts.Font`

  Font for inline text because, yes what you need are different objects with the same elements but different constraints.

  `b`

    Values must be of type <class ‘bool’>

  `charset`

    Values must be of type <class ‘int’>

  `color`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `condense`

    Values must be of type <class ‘bool’>

  `extend`

    Values must be of type <class ‘bool’>

  `family`

    Values must be of type <class ‘float’>

  `i`

    Values must be of type <class ‘bool’>

  `outline`

    Values must be of type <class ‘bool’>

  `rFont`

    Values must be of type <class ‘str’>

  `scheme`

    Value must be one of {‘minor’, ‘major’}

  `shadow`

    Values must be of type <class ‘bool’>

  `strike`

    Values must be of type <class ‘bool’>

  `sz`

    Values must be of type <class ‘float’>

  `tagname` = 'RPrElt'
  `u`

    Value must be one of {‘double’, ‘singleAccounting’, ‘doubleAccounting’, ‘single’}

  `vertAlign`

    Value must be one of {‘subscript’, ‘baseline’, ‘superscript’}

class `openpyxl.cell.text.``PhoneticProperties`(fontId=None, type=None, alignment=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alignment`

    Value must be one of {‘left’, ‘noControl’, ‘distributed’, ‘center’}

  `fontId`

    Values must be of type <class ‘int’>

  `tagname` = 'phoneticPr'
  `type`

    Value must be one of {‘noConversion’, ‘Hiragana’, ‘fullwidthKatakana’, ‘halfwidthKatakana’}

class `openpyxl.cell.text.``PhoneticText`(sb=None, eb=None, t=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `eb`

    Values must be of type <class ‘int’>

  `sb`

    Values must be of type <class ‘int’>

  `t`

    Values must be of type <class ‘str’>

  `tagname` = 'rPh'
  `text`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.cell.text.``RichText`(rPr=None, t=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `font`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `rPr`

    Values must be of type <class ‘openpyxl.cell.text.InlineFont’>

  `t`

    Values must be of type <class ‘str’>

  `tagname` = 'RElt'
  `text`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.cell.text.``Text`(t=None, r=(), rPh=(), phoneticPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `PhoneticProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `content`

    Text stripped of all formatting

  `formatted`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `phonetic`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `phoneticPr`

    Values must be of type <class ‘openpyxl.cell.text.PhoneticProperties’>

  `plain`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `r`

    A sequence (list or tuple) that may only contain objects of the declared type

  `rPh`

    A sequence (list or tuple) that may only contain objects of the declared type

  `t`

    Values must be of type <class ‘str’>

  `tagname` = 'text'

###### openpyxl.chart package

Submodules
openpyxl.chart.area_chart module

class `openpyxl.chart.area_chart.``AreaChart`(axId=None, extLst=None, **kw)

  Bases: `openpyxl.chart.area_chart._AreaChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dropLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `grouping`

    Value must be one of {‘percentStacked’, ‘stacked’, ‘standard’}

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'areaChart'
  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

class `openpyxl.chart.area_chart.``AreaChart3D`(gapDepth=None, **kw)

  Bases: `openpyxl.chart.area_chart.AreaChart`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dropLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `gapDepth`

    Values must be of type <class ‘float’>

  `grouping`

    Value must be one of {‘percentStacked’, ‘stacked’, ‘standard’}

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'area3DChart'
  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

  `z_axis`

    Values must be of type <class ‘openpyxl.chart.axis.SeriesAxis’>

openpyxl.chart.axis module

class `openpyxl.chart.axis.``ChartLines`(spPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'chartLines'

class `openpyxl.chart.axis.``DateAxis`(auto=None, lblOffset=None, baseTimeUnit=None, majorUnit=None, majorTimeUnit=None, minorUnit=None, minorTimeUnit=None, extLst=None, **kw)

  Bases: `openpyxl.chart.axis.TextAxis`

  `auto`

    Values must be of type <class ‘bool’>

  `axId`

    Values must be of type <class ‘int’>

  `axPos`

    Value must be one of {‘t’, ‘r’, ‘l’, ‘b’}

  `baseTimeUnit`

    Value must be one of {‘years’, ‘days’, ‘months’}

  `crossAx`

    Values must be of type <class ‘int’>

  `crosses`

    Value must be one of {‘autoZero’, ‘min’, ‘max’}

  `crossesAt`

    Values must be of type <class ‘float’>

  `delete`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `lblOffset`

    Values must be of type <class ‘int’>

  `majorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `majorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `majorTimeUnit`

    Value must be one of {‘years’, ‘days’, ‘months’}

  `majorUnit`

    Values must be of type <class ‘float’>

  `minorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `minorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `minorTimeUnit`

    Value must be one of {‘years’, ‘days’, ‘months’}

  `minorUnit`

    Values must be of type <class ‘float’>

  `numFmt`

    Values must be of type <class ‘openpyxl.chart.data_source.NumFmt’>

  `scaling`

    Values must be of type <class ‘openpyxl.chart.axis.Scaling’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'dateAx'
  `tickLblPos`

    Value must be one of {‘low’, ‘nextTo’, ‘high’}

  `title`

    Values must be of type <class ‘openpyxl.chart.title.Title’>

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.axis.``DisplayUnitsLabel`(layout=None, tx=None, spPr=None, txPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `layout`

    Values must be of type <class ‘openpyxl.chart.layout.Layout’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'dispUnitsLbl'
  `text`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `textPropertes`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tx`

    Values must be of type <class ‘openpyxl.chart.text.Text’>

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.axis.``DisplayUnitsLabelList`(custUnit=None, builtInUnit=None, dispUnitsLbl=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `builtInUnit`

    Value must be one of {‘trillions’, ‘billions’, ‘millions’, ‘hundreds’, ‘hundredMillions’, ‘tenThousands’, ‘hundredThousands’, ‘thousands’, ‘tenMillions’}

  `custUnit`

    Values must be of type <class ‘float’>

  `dispUnitsLbl`

    Values must be of type <class ‘openpyxl.chart.axis.DisplayUnitsLabel’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `tagname` = 'dispUnits'

class `openpyxl.chart.axis.``NumericAxis`(crossBetween=None, majorUnit=None, minorUnit=None, dispUnits=None, extLst=None, **kw)

  Bases: `openpyxl.chart.axis._BaseAxis`

  `axId`

    Values must be of type <class ‘int’>

  `axPos`

    Value must be one of {‘t’, ‘r’, ‘l’, ‘b’}

  `crossAx`

    Values must be of type <class ‘int’>

  `crossBetween`

    Value must be one of {‘midCat’, ‘between’}

  `crosses`

    Value must be one of {‘autoZero’, ‘min’, ‘max’}

  `crossesAt`

    Values must be of type <class ‘float’>

  `delete`

    Values must be of type <class ‘bool’>

  `dispUnits`

    Values must be of type <class ‘openpyxl.chart.axis.DisplayUnitsLabelList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  classmethod `from_tree`(node)

    Special case value axes with no gridlines

  `majorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `majorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `majorUnit`

    Values must be of type <class ‘float’>

  `minorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `minorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `minorUnit`

    Values must be of type <class ‘float’>

  `numFmt`

    Values must be of type <class ‘openpyxl.chart.data_source.NumFmt’>

  `scaling`

    Values must be of type <class ‘openpyxl.chart.axis.Scaling’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'valAx'
  `tickLblPos`

    Value must be one of {‘low’, ‘nextTo’, ‘high’}

  `title`

    Values must be of type <class ‘openpyxl.chart.title.Title’>

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.axis.``Scaling`(logBase=None, orientation='minMax', max=None, min=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `logBase`

    Values must be of type <class ‘float’>

  `max`

    Values must be of type <class ‘float’>

  `min`

    Values must be of type <class ‘float’>

  `orientation`

    Value must be one of {‘minMax’, ‘maxMin’}

  `tagname` = 'scaling'

class `openpyxl.chart.axis.``SeriesAxis`(tickLblSkip=None, tickMarkSkip=None, extLst=None, **kw)

  Bases: `openpyxl.chart.axis._BaseAxis`

  `axId`

    Values must be of type <class ‘int’>

  `axPos`

    Value must be one of {‘t’, ‘r’, ‘l’, ‘b’}

  `crossAx`

    Values must be of type <class ‘int’>

  `crosses`

    Value must be one of {‘autoZero’, ‘min’, ‘max’}

  `crossesAt`

    Values must be of type <class ‘float’>

  `delete`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `majorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `majorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `minorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `minorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `numFmt`

    Values must be of type <class ‘openpyxl.chart.data_source.NumFmt’>

  `scaling`

    Values must be of type <class ‘openpyxl.chart.axis.Scaling’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'serAx'
  `tickLblPos`

    Value must be one of {‘low’, ‘nextTo’, ‘high’}

  `tickLblSkip`

    Values must be of type <class ‘int’>

  `tickMarkSkip`

    Values must be of type <class ‘int’>

  `title`

    Values must be of type <class ‘openpyxl.chart.title.Title’>

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.axis.``TextAxis`(auto=None, lblAlgn=None, lblOffset=100, tickLblSkip=None, tickMarkSkip=None, noMultiLvlLbl=None, extLst=None, **kw)

  Bases: `openpyxl.chart.axis._BaseAxis`

  `auto`

    Values must be of type <class ‘bool’>

  `axId`

    Values must be of type <class ‘int’>

  `axPos`

    Value must be one of {‘t’, ‘r’, ‘l’, ‘b’}

  `crossAx`

    Values must be of type <class ‘int’>

  `crosses`

    Value must be one of {‘autoZero’, ‘min’, ‘max’}

  `crossesAt`

    Values must be of type <class ‘float’>

  `delete`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `lblAlgn`

    Value must be one of {‘ctr’, ‘r’, ‘l’}

  `lblOffset`

    Values must be of type <class ‘float’>

  `majorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `majorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `minorGridlines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `minorTickMark`

    Value must be one of {‘out’, ‘cross’, ‘in’}

  `noMultiLvlLbl`

    Values must be of type <class ‘bool’>

  `numFmt`

    Values must be of type <class ‘openpyxl.chart.data_source.NumFmt’>

  `scaling`

    Values must be of type <class ‘openpyxl.chart.axis.Scaling’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'catAx'
  `tickLblPos`

    Value must be one of {‘low’, ‘nextTo’, ‘high’}

  `tickLblSkip`

    Values must be of type <class ‘int’>

  `tickMarkSkip`

    Values must be of type <class ‘int’>

  `title`

    Values must be of type <class ‘openpyxl.chart.title.Title’>

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

openpyxl.chart.bar_chart module

class `openpyxl.chart.bar_chart.``BarChart`(gapWidth=150, overlap=None, serLines=None, extLst=None, **kw)

  Bases: `openpyxl.chart.bar_chart._BarChartBase`

  `barDir`

    Value must be one of {‘col’, ‘bar’}

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gapWidth`

    Values must be of type <class ‘float’>

  `grouping`

    Value must be one of {‘stacked’, ‘percentStacked’, ‘clustered’, ‘standard’}

  `overlap`

    Values must be of type <class ‘float’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `serLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `tagname` = 'barChart'
  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

class `openpyxl.chart.bar_chart.``BarChart3D`(gapWidth=150, gapDepth=150, shape=None, serLines=None, extLst=None, **kw)

  Bases: `openpyxl.chart.bar_chart._BarChartBase`, `openpyxl.chart._3d._3DBase`

  `backWall`

    Values must be of type <class ‘openpyxl.chart._3d.Surface’>

  `barDir`

    Value must be one of {‘col’, ‘bar’}

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `floor`

    Values must be of type <class ‘openpyxl.chart._3d.Surface’>

  `gapDepth`

    Values must be of type <class ‘float’>

  `gapWidth`

    Values must be of type <class ‘float’>

  `grouping`

    Value must be one of {‘stacked’, ‘percentStacked’, ‘clustered’, ‘standard’}

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `serLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `shape`

    Value must be one of {‘box’, ‘pyramidToMax’, ‘coneToMax’, ‘cylinder’, ‘pyramid’, ‘cone’}

  `sideWall`

    Values must be of type <class ‘openpyxl.chart._3d.Surface’>

  `tagname` = 'bar3DChart'
  `varyColors`

    Values must be of type <class ‘bool’>

  `view3D`

    Values must be of type <class ‘openpyxl.chart._3d.View3D’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

  `z_axis`

    Values must be of type <class ‘openpyxl.chart.axis.SeriesAxis’>

openpyxl.chart.bubble_chart module

class `openpyxl.chart.bubble_chart.``BubbleChart`(varyColors=None, ser=(), dLbls=None, bubble3D=None, bubbleScale=None, showNegBubbles=None, sizeRepresents=None, extLst=None, **kw)

  Bases: `openpyxl.chart._chart.ChartBase`

  `bubble3D`

    Values must be of type <class ‘bool’>

  `bubbleScale`

    Values must be of type <class ‘float’>

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dataLabels`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `showNegBubbles`

    Values must be of type <class ‘bool’>

  `sizeRepresents`

    Value must be one of {‘w’, ‘area’}

  `tagname` = 'bubbleChart'
  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

openpyxl.chart.chartspace module

Enclosing chart object. The various chart types are actually child objects. Will probably need to call this indirectly

class `openpyxl.chart.chartspace.``ChartContainer`(title=None, autoTitleDeleted=None, pivotFmts=(), view3D=None, floor=None, sideWall=None, backWall=None, plotArea=None, legend=None, plotVisOnly=True, dispBlanksAs='gap', showDLblsOverMax=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoTitleDeleted`

    Values must be of type <class ‘bool’>

  `backWall`

    Values must be of type <class ‘openpyxl.chart._3d.Surface’>

  `dispBlanksAs`

    Value must be one of {‘gap’, ‘span’, ‘zero’}

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `floor`

    Values must be of type <class ‘openpyxl.chart._3d.Surface’>

  `legend`

    Values must be of type <class ‘openpyxl.chart.legend.Legend’>

  `pivotFmts`

    Wrap a sequence in an containing object

  `plotArea`

    Values must be of type <class ‘openpyxl.chart.plotarea.PlotArea’>

  `plotVisOnly`

    Values must be of type <class ‘bool’>

  `showDLblsOverMax`

    Values must be of type <class ‘bool’>

  `sideWall`

    Values must be of type <class ‘openpyxl.chart._3d.Surface’>

  `tagname` = 'chart'
  `title`

    Values must be of type <class ‘openpyxl.chart.title.Title’>

  `view3D`

    Values must be of type <class ‘openpyxl.chart._3d.View3D’>

class `openpyxl.chart.chartspace.``ChartSpace`(date1904=None, lang=None, roundedCorners=None, style=None, clrMapOvr=None, pivotSource=None, protection=None, chart=None, spPr=None, txPr=None, externalData=None, printSettings=None, userShapes=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `chart`

    Values must be of type <class ‘openpyxl.chart.chartspace.ChartContainer’>

  `clrMapOvr`

    Values must be of type <class ‘openpyxl.drawing.colors.ColorMapping’>

  `date1904`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `externalData`

    Values must be of type <class ‘openpyxl.chart.chartspace.ExternalData’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `lang`

    Values must be of type <class ‘str’>

  `pivotSource`

    Values must be of type <class ‘openpyxl.chart.pivot.PivotSource’>

  `printSettings`

    Values must be of type <class ‘openpyxl.chart.print_settings.PrintSettings’>

  `protection`

    Values must be of type <class ‘openpyxl.chart.chartspace.Protection’>

  `roundedCorners`

    Values must be of type <class ‘bool’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `style`

    Values must be of type <class ‘float’>

  `tagname` = 'chartSpace'
  `textProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `to_tree`(tagname=None, idx=None, namespace=None)
  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

  `userShapes`

    Values must be of type <class ‘str’>

class `openpyxl.chart.chartspace.``ExternalData`(autoUpdate=None, id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoUpdate`

    Values must be of type <class ‘bool’>

  `id`

    Values must be of type <class ‘str’>

  `tagname` = 'externalData'

class `openpyxl.chart.chartspace.``Protection`(chartObject=None, data=None, formatting=None, selection=None, userInterface=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `chartObject`

    Values must be of type <class ‘bool’>

  `data`

    Values must be of type <class ‘bool’>

  `formatting`

    Values must be of type <class ‘bool’>

  `selection`

    Values must be of type <class ‘bool’>

  `tagname` = 'protection'
  `userInterface`

    Values must be of type <class ‘bool’>

openpyxl.chart.data_source module

Collection of utility primitives for charts.

class `openpyxl.chart.data_source.``AxDataSource`(numRef=None, numLit=None, strRef=None, strLit=None, multiLvlStrRef=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `multiLvlStrRef`

    Values must be of type <class ‘openpyxl.chart.data_source.MultiLevelStrRef’>

  `numLit`

    Values must be of type <class ‘openpyxl.chart.data_source.NumData’>

  `numRef`

    Values must be of type <class ‘openpyxl.chart.data_source.NumRef’>

  `strLit`

    Values must be of type <class ‘openpyxl.chart.data_source.StrData’>

  `strRef`

    Values must be of type <class ‘openpyxl.chart.data_source.StrRef’>

  `tagname` = 'cat'

class `openpyxl.chart.data_source.``Level`(pt=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `pt`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'lvl'

class `openpyxl.chart.data_source.``MultiLevelStrData`(ptCount=None, lvl=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `lvl`

    A sequence (list or tuple) that may only contain objects of the declared type

  `ptCount`

    Values must be of type <class ‘int’>

  `tagname` = 'multiLvlStrData'

class `openpyxl.chart.data_source.``MultiLevelStrRef`(f=None, multiLvlStrCache=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `f`

    Values must be of type <class ‘str’>

  `multiLvlStrCache`

    Values must be of type <class ‘openpyxl.chart.data_source.MultiLevelStrData’>

  `tagname` = 'multiLvlStrRef'

class `openpyxl.chart.data_source.``NumData`(formatCode=None, ptCount=None, pt=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `formatCode`

    Values must be of type <class ‘str’>

  `pt`

    A sequence (list or tuple) that may only contain objects of the declared type

  `ptCount`

    Values must be of type <class ‘int’>

class `openpyxl.chart.data_source.``NumDataSource`(numRef=None, numLit=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `numLit`

    Values must be of type <class ‘openpyxl.chart.data_source.NumData’>

  `numRef`

    Values must be of type <class ‘openpyxl.chart.data_source.NumRef’>

class `openpyxl.chart.data_source.``NumFmt`(formatCode=None, sourceLinked=False)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `formatCode`

    Values must be of type <class ‘str’>

  `sourceLinked`

    Values must be of type <class ‘bool’>

class `openpyxl.chart.data_source.``NumRef`(f=None, numCache=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `f`

    Values must be of type <class ‘str’>

  `numCache`

    Values must be of type <class ‘openpyxl.chart.data_source.NumData’>

  `ref`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.chart.data_source.``NumVal`(idx=None, formatCode=None, v=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `formatCode`

    Values must be of type <class ‘str’>

  `idx`

    Values must be of type <class ‘int’>

  `v`

    Values must be of type <class ‘NoneType’>

class `openpyxl.chart.data_source.``NumberValueDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.NestedText`

  Data should be numerical but isn’t always :-/

  `allow_none` = True

class `openpyxl.chart.data_source.``StrData`(ptCount=None, pt=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `pt`

    A sequence (list or tuple) that may only contain objects of the declared type

  `ptCount`

    Values must be of type <class ‘int’>

  `tagname` = 'strData'

class `openpyxl.chart.data_source.``StrRef`(f=None, strCache=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `f`

    Values must be of type <class ‘str’>

  `strCache`

    Values must be of type <class ‘openpyxl.chart.data_source.StrData’>

  `tagname` = 'strRef'

class `openpyxl.chart.data_source.``StrVal`(idx=0, v=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `idx`

    Values must be of type <class ‘int’>

  `tagname` = 'strVal'
  `v`

    Values must be of type <class ‘str’>

openpyxl.chart.descriptors module

class `openpyxl.chart.descriptors.``NestedGapAmount`(**kw)

  Bases: `openpyxl.descriptors.nested.NestedMinMax`

  `allow_none` = True
  `max` = 500
  `min` = 0

class `openpyxl.chart.descriptors.``NestedOverlap`(**kw)

  Bases: `openpyxl.descriptors.nested.NestedMinMax`

  `allow_none` = True
  `max` = 100
  `min` = -100

class `openpyxl.chart.descriptors.``NumberFormatDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  Allow direct assignment of format code

  `allow_none` = True
  `expected_type`

    alias of `openpyxl.chart.data_source.NumFmt`

openpyxl.chart.error_bar module

class `openpyxl.chart.error_bar.``ErrorBars`(errDir=None, errBarType='both', errValType='fixedVal', noEndCap=None, plus=None, minus=None, val=None, spPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `direction`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `errBarType`

    Value must be one of {‘minus’, ‘plus’, ‘both’}

  `errDir`

    Value must be one of {‘y’, ‘x’}

  `errValType`

    Value must be one of {‘stdDev’, ‘cust’, ‘percentage’, ‘fixedVal’, ‘stdErr’}

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `minus`

    Values must be of type <class ‘openpyxl.chart.data_source.NumDataSource’>

  `noEndCap`

    Values must be of type <class ‘bool’>

  `plus`

    Values must be of type <class ‘openpyxl.chart.data_source.NumDataSource’>

  `size`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `style`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'errBars'
  `val`

    Values must be of type <class ‘float’>

openpyxl.chart.label module

class `openpyxl.chart.label.``DataLabel`(idx=0, **kw)

  Bases: `openpyxl.chart.label._DataLabelBase`

  `dLblPos`

    Value must be one of {‘ctr’, ‘r’, ‘t’, ‘bestFit’, ‘outEnd’, ‘inBase’, ‘inEnd’, ‘b’, ‘l’}

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `idx`

    Values must be of type <class ‘int’>

  `numFmt`

    Values must be of type <class ‘str’>

  `separator`

    Values must be of type <class ‘str’>

  `showBubbleSize`

    Values must be of type <class ‘bool’>

  `showCatName`

    Values must be of type <class ‘bool’>

  `showLeaderLines`

    Values must be of type <class ‘bool’>

  `showLegendKey`

    Values must be of type <class ‘bool’>

  `showPercent`

    Values must be of type <class ‘bool’>

  `showSerName`

    Values must be of type <class ‘bool’>

  `showVal`

    Values must be of type <class ‘bool’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'dLbl'
  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.label.``DataLabelList`(dLbl=(), delete=None, **kw)

  Bases: `openpyxl.chart.label._DataLabelBase`

  `dLbl`

    A sequence (list or tuple) that may only contain objects of the declared type

  `dLblPos`

    Value must be one of {‘ctr’, ‘r’, ‘t’, ‘bestFit’, ‘outEnd’, ‘inBase’, ‘inEnd’, ‘b’, ‘l’}

  `delete`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `numFmt`

    Values must be of type <class ‘str’>

  `separator`

    Values must be of type <class ‘str’>

  `showBubbleSize`

    Values must be of type <class ‘bool’>

  `showCatName`

    Values must be of type <class ‘bool’>

  `showLeaderLines`

    Values must be of type <class ‘bool’>

  `showLegendKey`

    Values must be of type <class ‘bool’>

  `showPercent`

    Values must be of type <class ‘bool’>

  `showSerName`

    Values must be of type <class ‘bool’>

  `showVal`

    Values must be of type <class ‘bool’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'dLbls'
  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

openpyxl.chart.layout module

class `openpyxl.chart.layout.``Layout`(manualLayout=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `manualLayout`

    Values must be of type <class ‘openpyxl.chart.layout.ManualLayout’>

  `tagname` = 'layout'

class `openpyxl.chart.layout.``ManualLayout`(layoutTarget=None, xMode=None, yMode=None, wMode='factor', hMode='factor', x=None, y=None, w=None, h=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `h`

    Values must be of type <class ‘float’>

  `hMode`

    Value must be one of {‘factor’, ‘edge’}

  `height`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `layoutTarget`

    Value must be one of {‘inner’, ‘outer’}

  `tagname` = 'manualLayout'
  `w`

    Values must be of type <class ‘float’>

  `wMode`

    Value must be one of {‘factor’, ‘edge’}

  `width`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `x`

    Values must be of type <class ‘float’>

  `xMode`

    Value must be one of {‘factor’, ‘edge’}

  `y`

    Values must be of type <class ‘float’>

  `yMode`

    Value must be one of {‘factor’, ‘edge’}

openpyxl.chart.legend module

class `openpyxl.chart.legend.``Legend`(legendPos='r', legendEntry=(), layout=None, overlay=None, spPr=None, txPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `layout`

    Values must be of type <class ‘openpyxl.chart.layout.Layout’>

  `legendEntry`

    A sequence (list or tuple) that may only contain objects of the declared type

  `legendPos`

    Value must be one of {‘t’, ‘r’, ‘b’, ‘tr’, ‘l’}

  `overlay`

    Values must be of type <class ‘bool’>

  `position`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'legend'
  `textProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.legend.``LegendEntry`(idx=0, delete=False, txPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `delete`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `idx`

    Values must be of type <class ‘int’>

  `tagname` = 'legendEntry'
  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

openpyxl.chart.line_chart module

class `openpyxl.chart.line_chart.``LineChart`(hiLowLines=None, upDownBars=None, marker=None, smooth=None, extLst=None, **kw)

  Bases: `openpyxl.chart.line_chart._LineChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dropLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `grouping`

    Value must be one of {‘percentStacked’, ‘stacked’, ‘standard’}

  `hiLowLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `marker`

    Values must be of type <class ‘bool’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `smooth`

    Values must be of type <class ‘bool’>

  `tagname` = 'lineChart'
  `upDownBars`

    Values must be of type <class ‘openpyxl.chart.updown_bars.UpDownBars’>

  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis._BaseAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

class `openpyxl.chart.line_chart.``LineChart3D`(gapDepth=None, hiLowLines=None, upDownBars=None, marker=None, smooth=None, **kw)

  Bases: `openpyxl.chart.line_chart._LineChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dropLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gapDepth`

    Values must be of type <class ‘float’>

  `grouping`

    Value must be one of {‘percentStacked’, ‘stacked’, ‘standard’}

  `hiLowLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `marker`

    Values must be of type <class ‘bool’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `smooth`

    Values must be of type <class ‘bool’>

  `tagname` = 'line3DChart'
  `upDownBars`

    Values must be of type <class ‘openpyxl.chart.updown_bars.UpDownBars’>

  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

  `z_axis`

    Values must be of type <class ‘openpyxl.chart.axis.SeriesAxis’>

openpyxl.chart.marker module

class `openpyxl.chart.marker.``DataPoint`(idx=None, invertIfNegative=None, marker=None, bubble3D=None, explosion=None, spPr=None, pictureOptions=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `bubble3D`

    Values must be of type <class ‘bool’>

  `explosion`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `idx`

    Values must be of type <class ‘int’>

  `invertIfNegative`

    Values must be of type <class ‘bool’>

  `marker`

    Values must be of type <class ‘openpyxl.chart.marker.Marker’>

  `pictureOptions`

    Values must be of type <class ‘openpyxl.chart.picture.PictureOptions’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'dPt'

class `openpyxl.chart.marker.``Marker`(symbol=None, size=None, spPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `size`

    Values must be of type <class ‘float’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `symbol`

    Value must be one of {‘plus’, ‘square’, ‘circle’, ‘triangle’, ‘star’, ‘picture’, ‘auto’, ‘dot’, ‘dash’, ‘diamond’, ‘x’}

  `tagname` = 'marker'

openpyxl.chart.picture module

class `openpyxl.chart.picture.``PictureOptions`(applyToFront=None, applyToSides=None, applyToEnd=None, pictureFormat=None, pictureStackUnit=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `applyToEnd`

    Values must be of type <class ‘bool’>

  `applyToFront`

    Values must be of type <class ‘bool’>

  `applyToSides`

    Values must be of type <class ‘bool’>

  `pictureFormat`

    Value must be one of {‘stack’, ‘stackScale’, ‘stretch’}

  `pictureStackUnit`

    Values must be of type <class ‘float’>

  `tagname` = 'pictureOptions'

openpyxl.chart.pie_chart module

class `openpyxl.chart.pie_chart.``CustomSplit`(secondPiePt=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `secondPiePt`

    A sequence of primitive types that are stored as a single attribute. “val” is the default attribute

  `tagname` = 'custSplit'

class `openpyxl.chart.pie_chart.``DoughnutChart`(firstSliceAng=0, holeSize=10, extLst=None, **kw)

  Bases: `openpyxl.chart.pie_chart._PieChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `firstSliceAng`

    Values must be of type <class ‘float’>

  `holeSize`

    Values must be of type <class ‘float’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'doughnutChart'
  `varyColors`

    Values must be of type <class ‘bool’>

class `openpyxl.chart.pie_chart.``PieChart`(firstSliceAng=0, extLst=None, **kw)

  Bases: `openpyxl.chart.pie_chart._PieChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `firstSliceAng`

    Values must be of type <class ‘float’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'pieChart'
  `varyColors`

    Values must be of type <class ‘bool’>

class `openpyxl.chart.pie_chart.``PieChart3D`(varyColors=True, ser=(), dLbls=None)

  Bases: `openpyxl.chart.pie_chart._PieChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'pie3DChart'
  `varyColors`

    Values must be of type <class ‘bool’>

class `openpyxl.chart.pie_chart.``ProjectedPieChart`(ofPieType='pie', gapWidth=None, splitType='auto', splitPos=None, custSplit=None, secondPieSize=75, serLines=None, extLst=None, **kw)

  Bases: `openpyxl.chart.pie_chart._PieChartBase`

  From the spec 21.2.2.126

  This element contains the pie of pie or bar of pie series on this chart. Only the first series shall be displayed. The splitType element shall determine whether the splitPos and custSplit elements apply.

  `custSplit`

    Values must be of type <class ‘openpyxl.chart.pie_chart.CustomSplit’>

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gapWidth`

    Values must be of type <class ‘float’>

  `join_lines`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `ofPieType`

    Value must be one of {‘pie’, ‘bar’}

  `secondPieSize`

    Values must be of type <class ‘float’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `serLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `splitPos`

    Values must be of type <class ‘float’>

  `splitType`

    Value must be one of {‘pos’, ‘val’, ‘cust’, ‘auto’, ‘percent’}

  `tagname` = 'ofPieChart'
  `type`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `varyColors`

    Values must be of type <class ‘bool’>

openpyxl.chart.pivot module

class `openpyxl.chart.pivot.``PivotFormat`(idx=0, spPr=None, txPr=None, marker=None, dLbl=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `DataLabel`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `TextBody`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `dLbl`

    Values must be of type <class ‘openpyxl.chart.label.DataLabel’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `idx`

    Values must be of type <class ‘int’>

  `marker`

    Values must be of type <class ‘openpyxl.chart.marker.Marker’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'pivotFmt'
  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.pivot.``PivotSource`(name=None, fmtId=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fmtId`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'pivotSource'

openpyxl.chart.plotarea module

class `openpyxl.chart.plotarea.``DataTable`(showHorzBorder=None, showVertBorder=None, showOutline=None, showKeys=None, spPr=None, txPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `showHorzBorder`

    Values must be of type <class ‘bool’>

  `showKeys`

    Values must be of type <class ‘bool’>

  `showOutline`

    Values must be of type <class ‘bool’>

  `showVertBorder`

    Values must be of type <class ‘bool’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'dTable'
  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.plotarea.``PlotArea`(layout=None, dTable=None, spPr=None, _charts=(), _axes=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `area3DChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `areaChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `bar3DChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `barChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `bubbleChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `catAx`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `dTable`

    Values must be of type <class ‘openpyxl.chart.plotarea.DataTable’>

  `dateAx`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `doughnutChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  classmethod `from_tree`(node)

    Create object from XML

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `layout`

    Values must be of type <class ‘openpyxl.chart.layout.Layout’>

  `line3DChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `lineChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `ofPieChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `pie3DChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `pieChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `radarChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `scatterChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `serAx`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `stockChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `surface3DChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `surfaceChart`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `tagname` = 'plotArea'
  `to_tree`(tagname=None, idx=None, namespace=None)
  `valAx`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

openpyxl.chart.print_settings module

class `openpyxl.chart.print_settings.``PageMargins`(l=0.75, r=0.75, t=1, b=1, header=0.5, footer=0.5)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Identical to openpyxl.worksheet.page.Pagemargins but element names are different :-/

  `b`

    Values must be of type <class ‘float’>

  `bottom`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `footer`

    Values must be of type <class ‘float’>

  `header`

    Values must be of type <class ‘float’>

  `l`

    Values must be of type <class ‘float’>

  `left`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `r`

    Values must be of type <class ‘float’>

  `right`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `t`

    Values must be of type <class ‘float’>

  `tagname` = 'pageMargins'
  `top`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.chart.print_settings.``PrintSettings`(headerFooter=None, pageMargins=None, pageSetup=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `headerFooter`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooter’>

  `pageMargins`

    Values must be of type <class ‘openpyxl.chart.print_settings.PageMargins’>

  `pageSetup`

    Values must be of type <class ‘openpyxl.worksheet.page.PrintPageSetup’>

  `tagname` = 'printSettings'

openpyxl.chart.radar_chart module

class `openpyxl.chart.radar_chart.``RadarChart`(radarStyle='standard', varyColors=None, ser=(), dLbls=None, extLst=None, **kw)

  Bases: `openpyxl.chart._chart.ChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dataLabels`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `radarStyle`

    Value must be one of {‘marker’, ‘standard’, ‘filled’}

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'radarChart'
  `type`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

openpyxl.chart.reader module

Read a chart

`openpyxl.chart.reader.``read_chart`(chartspace)

openpyxl.chart.reference module

class `openpyxl.chart.reference.``DummyWorksheet`(title)

  Bases: `object`

class `openpyxl.chart.reference.``Reference`(worksheet=None, min_col=None, min_row=None, max_col=None, max_row=None, range_string=None)

  Bases: `openpyxl.descriptors.Strict`

  Normalise cell range references

  `cols`

    Return all columns in the range

  `max_col`

    Values must be of type <class ‘int’>

  `max_row`

    Values must be of type <class ‘int’>

  `min_col`

    Values must be of type <class ‘int’>

  `min_row`

    Values must be of type <class ‘int’>

  `pop`()

    Return and remove the first cell

  `range_string`

    Values must be of type <class ‘str’>

  `rows`

    Return all rows in the range

  `sheetname`

openpyxl.chart.scatter_chart module

class `openpyxl.chart.scatter_chart.``ScatterChart`(scatterStyle=None, varyColors=None, ser=(), dLbls=None, extLst=None, **kw)

  Bases: `openpyxl.chart._chart.ChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dataLabels`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `scatterStyle`

    Value must be one of {‘lineMarker’, ‘line’, ‘marker’, ‘smooth’, ‘smoothMarker’}

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'scatterChart'
  `varyColors`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

openpyxl.chart.series module

class `openpyxl.chart.series.``Series`(idx=0, order=0, tx=None, spPr=None, pictureOptions=None, dPt=(), dLbls=None, trendline=None, errBars=None, cat=None, val=None, invertIfNegative=None, shape=None, xVal=None, yVal=None, bubbleSize=None, bubble3D=None, marker=None, smooth=None, explosion=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Generic series object. Should not be instantiated directly. User the chart.Series factory instead.

  `bubble3D`

    Values must be of type <class ‘bool’>

  `bubbleSize`

    Values must be of type <class ‘openpyxl.chart.data_source.NumDataSource’>

  `cat`

    Values must be of type <class ‘openpyxl.chart.data_source.AxDataSource’>

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dPt`

    A sequence (list or tuple) that may only contain objects of the declared type

  `data_points`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `errBars`

    Values must be of type <class ‘openpyxl.chart.error_bar.ErrorBars’>

  `explosion`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `identifiers`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `idx`

    Values must be of type <class ‘int’>

  `invertIfNegative`

    Values must be of type <class ‘bool’>

  `labels`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `marker`

    Values must be of type <class ‘openpyxl.chart.marker.Marker’>

  `order`

    Values must be of type <class ‘int’>

  `pictureOptions`

    Values must be of type <class ‘openpyxl.chart.picture.PictureOptions’>

  `shape`

    Value must be one of {‘box’, ‘pyramidToMax’, ‘coneToMax’, ‘cylinder’, ‘pyramid’, ‘cone’}

  `smooth`

    Values must be of type <class ‘bool’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'ser'
  `title`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `to_tree`(tagname=None, idx=None)

    The index can need rebasing

  `trendline`

    Values must be of type <class ‘openpyxl.chart.trendline.Trendline’>

  `tx`

    Values must be of type <class ‘openpyxl.chart.series.SeriesLabel’>

  `val`

    Values must be of type <class ‘openpyxl.chart.data_source.NumDataSource’>

  `xVal`

    Values must be of type <class ‘openpyxl.chart.data_source.AxDataSource’>

  `yVal`

    Values must be of type <class ‘openpyxl.chart.data_source.NumDataSource’>

  `zVal`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.chart.series.``SeriesLabel`(strRef=None, v=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `strRef`

    Values must be of type <class ‘openpyxl.chart.data_source.StrRef’>

  `tagname` = 'tx'
  `v`

    Values must be of type <class ‘str’>

  `value`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.chart.series.``XYSeries`(idx=0, order=0, tx=None, spPr=None, pictureOptions=None, dPt=(), dLbls=None, trendline=None, errBars=None, cat=None, val=None, invertIfNegative=None, shape=None, xVal=None, yVal=None, bubbleSize=None, bubble3D=None, marker=None, smooth=None, explosion=None, extLst=None)

  Bases: `openpyxl.chart.series.Series`

  Dedicated series for charts that have x and y series

  `bubble3D`

    Values must be of type <class ‘bool’>

  `bubbleSize`

    Values must be of type <class ‘openpyxl.chart.data_source.NumDataSource’>

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dPt`

    A sequence (list or tuple) that may only contain objects of the declared type

  `errBars`

    Values must be of type <class ‘openpyxl.chart.error_bar.ErrorBars’>

  `idx`

    Values must be of type <class ‘int’>

  `invertIfNegative`

    Values must be of type <class ‘bool’>

  `marker`

    Values must be of type <class ‘openpyxl.chart.marker.Marker’>

  `order`

    Values must be of type <class ‘int’>

  `smooth`

    Values must be of type <class ‘bool’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `trendline`

    Values must be of type <class ‘openpyxl.chart.trendline.Trendline’>

  `tx`

    Values must be of type <class ‘openpyxl.chart.series.SeriesLabel’>

  `xVal`

    Values must be of type <class ‘openpyxl.chart.data_source.AxDataSource’>

  `yVal`

    Values must be of type <class ‘openpyxl.chart.data_source.NumDataSource’>

openpyxl.chart.series_factory module

`openpyxl.chart.series_factory.``SeriesFactory`(values, xvalues=None, zvalues=None, title=None, title_from_data=False)

  Convenience Factory for creating chart data series.

openpyxl.chart.shapes module

class `openpyxl.chart.shapes.``GraphicalProperties`(bwMode=None, xfrm=None, noFill=None, solidFill=None, gradFill=None, pattFill=None, ln=None, scene3d=None, custGeom=None, prstGeom=None, sp3d=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Somewhat vaguely 21.2.2.197 says this:

  This element specifies the formatting for the parent chart element. The custGeom, prstGeom, scene3d, and xfrm elements are not supported. The bwMode attribute is not supported.

  This doesn’t leave much. And the element is used in different places.

  `bwMode`

    Value must be one of {‘black’, ‘white’, ‘gray’, ‘ltGray’, ‘clr’, ‘hidden’, ‘blackGray’, ‘auto’, ‘invGray’, ‘blackWhite’, ‘grayWhite’}

  `custGeom`

    Values must be of type <class ‘openpyxl.drawing.geometry.CustomGeometry2D’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gradFill`

    Values must be of type <class ‘openpyxl.drawing.fill.GradientFillProperties’>

  `line`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `ln`

    Values must be of type <class ‘openpyxl.drawing.line.LineProperties’>

  `noFill`

    Values must be of type <class ‘bool’>

  `pattFill`

    Values must be of type <class ‘openpyxl.drawing.fill.PatternFillProperties’>

  `prstGeom`

    Values must be of type <class ‘openpyxl.drawing.geometry.PresetGeometry2D’>

  `scene3d`

    Values must be of type <class ‘openpyxl.drawing.geometry.Scene3D’>

  `shape3D`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `solidFill`

    Values must be of type <class ‘openpyxl.drawing.colors.ColorChoice’>

  `sp3d`

    Values must be of type <class ‘openpyxl.drawing.geometry.Shape3D’>

  `tagname` = 'spPr'
  `transform`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `xfrm`

    Values must be of type <class ‘openpyxl.drawing.geometry.Transform2D’>

openpyxl.chart.stock_chart module

class `openpyxl.chart.stock_chart.``StockChart`(ser=(), dLbls=None, dropLines=None, hiLowLines=None, upDownBars=None, extLst=None, **kw)

  Bases: `openpyxl.chart._chart.ChartBase`

  `dLbls`

    Values must be of type <class ‘openpyxl.chart.label.DataLabelList’>

  `dataLabels`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `dropLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `hiLowLines`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'stockChart'
  `upDownBars`

    Values must be of type <class ‘openpyxl.chart.updown_bars.UpDownBars’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

openpyxl.chart.surface_chart module

class `openpyxl.chart.surface_chart.``BandFormat`(idx=0, spPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `idx`

    Values must be of type <class ‘int’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'bandFmt'

class `openpyxl.chart.surface_chart.``BandFormatList`(bandFmt=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `bandFmt`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'bandFmts'

class `openpyxl.chart.surface_chart.``SurfaceChart`(**kw)

  Bases: `openpyxl.chart.surface_chart.SurfaceChart3D`

  `bandFmts`

    Values must be of type <class ‘openpyxl.chart.surface_chart.BandFormatList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'surfaceChart'
  `wireframe`

    Values must be of type <class ‘bool’>

class `openpyxl.chart.surface_chart.``SurfaceChart3D`(**kw)

  Bases: `openpyxl.chart.surface_chart._SurfaceChartBase`, `openpyxl.chart._3d._3DBase`

  `bandFmts`

    Values must be of type <class ‘openpyxl.chart.surface_chart.BandFormatList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `ser`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'surface3DChart'
  `wireframe`

    Values must be of type <class ‘bool’>

  `x_axis`

    Values must be of type <class ‘openpyxl.chart.axis.TextAxis’>

  `y_axis`

    Values must be of type <class ‘openpyxl.chart.axis.NumericAxis’>

  `z_axis`

    Values must be of type <class ‘openpyxl.chart.axis.SeriesAxis’>

openpyxl.chart.text module

class `openpyxl.chart.text.``RichText`(bodyPr=None, lstStyle=None, p=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  From the specification: 21.2.2.216

  This element specifies text formatting. The lstStyle element is not supported.

  `bodyPr`

    Values must be of type <class ‘openpyxl.drawing.text.RichTextProperties’>

  `lstStyle`

    Values must be of type <class ‘openpyxl.drawing.text.ListStyle’>

  `p`

    A sequence (list or tuple) that may only contain objects of the declared type

  `paragraphs`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `properties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'rich'

class `openpyxl.chart.text.``Text`(strRef=None, rich=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  The value can be either a cell reference or a text element If both are present then the reference will be used.

  `rich`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

  `strRef`

    Values must be of type <class ‘openpyxl.chart.data_source.StrRef’>

  `tagname` = 'tx'
  `to_tree`(tagname=None, idx=None, namespace=None)

openpyxl.chart.title module

class `openpyxl.chart.title.``Title`(tx=None, layout=None, overlay=None, spPr=None, txPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `body`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `layout`

    Values must be of type <class ‘openpyxl.chart.layout.Layout’>

  `overlay`

    Values must be of type <class ‘bool’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'title'
  `text`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tx`

    Values must be of type <class ‘openpyxl.chart.text.Text’>

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.chart.title.``TitleDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  `allow_none` = True
  `expected_type`

    alias of `Title`

`openpyxl.chart.title.``title_maker`(text)

openpyxl.chart.trendline module

class `openpyxl.chart.trendline.``Trendline`(name=None, spPr=None, trendlineType='linear', order=None, period=None, forward=None, backward=None, intercept=None, dispRSqr=None, dispEq=None, trendlineLbl=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `backward`

    Values must be of type <class ‘float’>

  `dispEq`

    Values must be of type <class ‘bool’>

  `dispRSqr`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `forward`

    Values must be of type <class ‘float’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `intercept`

    Values must be of type <class ‘float’>

  `name`

    Values must be of type <class ‘str’>

  `order`

    Values must be of type <class ‘int’>

  `period`

    Values must be of type <class ‘int’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'trendline'
  `trendlineLbl`

    Values must be of type <class ‘openpyxl.chart.trendline.TrendlineLabel’>

  `trendlineType`

    Value must be one of {‘linear’, ‘power’, ‘movingAvg’, ‘log’, ‘exp’, ‘poly’}

class `openpyxl.chart.trendline.``TrendlineLabel`(layout=None, tx=None, numFmt=None, spPr=None, txPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `layout`

    Values must be of type <class ‘openpyxl.chart.layout.Layout’>

  `numFmt`

    Values must be of type <class ‘openpyxl.chart.data_source.NumFmt’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `tagname` = 'trendlineLbl'
  `textProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tx`

    Values must be of type <class ‘openpyxl.chart.text.Text’>

  `txPr`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

openpyxl.chart.updown_bars module

class `openpyxl.chart.updown_bars.``UpDownBars`(gapWidth=150, upBars=None, downBars=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `downBars`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gapWidth`

    Values must be of type <class ‘float’>

  `tagname` = 'upbars'
  `upBars`

    Values must be of type <class ‘openpyxl.chart.axis.ChartLines’>

###### openpyxl.chartsheet package

Submodules
openpyxl.chartsheet.chartsheet module

class `openpyxl.chartsheet.chartsheet.``Chartsheet`(sheetPr=None, sheetViews=None, sheetProtection=None, customSheetViews=None, pageMargins=None, pageSetup=None, headerFooter=None, drawing=None, drawingHF=None, picture=None, webPublishItems=None, extLst=None, parent=None, title='', sheet_state='visible')

  Bases: `openpyxl.workbook.child._WorkbookChild`, `openpyxl.descriptors.serialisable.Serialisable`

  `HeaderFooter`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `add_chart`(chart)
  `customSheetViews`

    Values must be of type <class ‘openpyxl.chartsheet.custom.CustomChartsheetViews’>

  `drawing`

    Values must be of type <class ‘openpyxl.worksheet.drawing.Drawing’>

  `drawingHF`

    Values must be of type <class ‘openpyxl.chartsheet.relation.DrawingHF’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `headerFooter`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooter’>

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml'
  `pageMargins`

    Values must be of type <class ‘openpyxl.worksheet.page.PageMargins’>

  `pageSetup`

    Values must be of type <class ‘openpyxl.worksheet.page.PrintPageSetup’>

  `picture`

    Values must be of type <class ‘openpyxl.chartsheet.relation.SheetBackgroundPicture’>

  `sheetPr`

    Values must be of type <class ‘openpyxl.chartsheet.properties.ChartsheetProperties’>

  `sheetProtection`

    Values must be of type <class ‘openpyxl.chartsheet.protection.ChartsheetProtection’>

  `sheetViews`

    Values must be of type <class ‘openpyxl.chartsheet.views.ChartsheetViewList’>

  `sheet_state`

    Value must be one of {‘visible’, ‘veryHidden’, ‘hidden’}

  `tagname` = 'chartsheet'
  `to_tree`()
  `webPublishItems`

    Values must be of type <class ‘openpyxl.chartsheet.publish.WebPublishItems’>

openpyxl.chartsheet.custom module

class `openpyxl.chartsheet.custom.``CustomChartsheetView`(guid=None, scale=None, state='visible', zoomToFit=None, pageMargins=None, pageSetup=None, headerFooter=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `guid`
  `headerFooter`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooter’>

  `pageMargins`

    Values must be of type <class ‘openpyxl.worksheet.page.PageMargins’>

  `pageSetup`

    Values must be of type <class ‘openpyxl.worksheet.page.PrintPageSetup’>

  `scale`

    Values must be of type <class ‘int’>

  `state`

    Value must be one of {‘visible’, ‘veryHidden’, ‘hidden’}

  `tagname` = 'customSheetView'
  `zoomToFit`

    Values must be of type <class ‘bool’>

class `openpyxl.chartsheet.custom.``CustomChartsheetViews`(customSheetView=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `customSheetView`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'customSheetViews'

openpyxl.chartsheet.properties module

class `openpyxl.chartsheet.properties.``ChartsheetProperties`(published=None, codeName=None, tabColor=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `codeName`

    Values must be of type <class ‘str’>

  `published`

    Values must be of type <class ‘bool’>

  `tabColor`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `tagname` = 'sheetPr'

openpyxl.chartsheet.protection module

class `openpyxl.chartsheet.protection.``ChartsheetProtection`(content=None, objects=None, hashValue=None, spinCount=None, saltValue=None, algorithmName=None, password=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`, `openpyxl.worksheet.protection._Protected`

  `algorithmName`

    Values must be of type <class ‘str’>

  `content`

    Values must be of type <class ‘bool’>

  `hashValue`
  `objects`

    Values must be of type <class ‘bool’>

  `saltValue`
  `spinCount`

    Values must be of type <class ‘int’>

  `tagname` = 'sheetProtection'

openpyxl.chartsheet.publish module

class `openpyxl.chartsheet.publish.``WebPublishItem`(id=None, divId=None, sourceType=None, sourceRef=None, sourceObject=None, destinationFile=None, title=None, autoRepublish=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoRepublish`

    Values must be of type <class ‘bool’>

  `destinationFile`

    Values must be of type <class ‘str’>

  `divId`

    Values must be of type <class ‘str’>

  `id`

    Values must be of type <class ‘int’>

  `sourceObject`

    Values must be of type <class ‘str’>

  `sourceRef`

    Values must be of type <class ‘str’>

  `sourceType`

    Value must be one of {‘range’, ‘autoFilter’, ‘sheet’, ‘label’, ‘chart’, ‘query’, ‘pivotTable’, ‘printArea’}

  `tagname` = 'webPublishItem'
  `title`

    Values must be of type <class ‘str’>

class `openpyxl.chartsheet.publish.``WebPublishItems`(count=None, webPublishItem=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `tagname` = 'WebPublishItems'
  `webPublishItem`

    A sequence (list or tuple) that may only contain objects of the declared type

openpyxl.chartsheet.relation module

class `openpyxl.chartsheet.relation.``DrawingHF`(id=None, lho=None, lhe=None, lhf=None, cho=None, che=None, chf=None, rho=None, rhe=None, rhf=None, lfo=None, lfe=None, lff=None, cfo=None, cfe=None, cff=None, rfo=None, rfe=None, rff=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `centerFooterEvenPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `centerFooterFirstPage`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `centerFooterOddPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `centerHeaderEvenPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `centerHeaderFirstPage`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `centerHeaderOddPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `cfe`

    Values must be of type <class ‘int’>

  `cff`

    Values must be of type <class ‘int’>

  `cfo`

    Values must be of type <class ‘int’>

  `che`

    Values must be of type <class ‘int’>

  `chf`

    Values must be of type <class ‘int’>

  `cho`

    Values must be of type <class ‘int’>

  `id`

    Values must be of type <class ‘str’>

  `leftFooterEvenPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `leftFooterFirstPage`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `leftFooterOddPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `leftHeaderEvenPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `leftHeaderFirstPage`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `leftHeaderOddPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `lfe`

    Values must be of type <class ‘int’>

  `lff`

    Values must be of type <class ‘int’>

  `lfo`

    Values must be of type <class ‘int’>

  `lhe`

    Values must be of type <class ‘int’>

  `lhf`

    Values must be of type <class ‘int’>

  `lho`

    Values must be of type <class ‘int’>

  `rfe`

    Values must be of type <class ‘int’>

  `rff`

    Values must be of type <class ‘int’>

  `rfo`

    Values must be of type <class ‘int’>

  `rhe`

    Values must be of type <class ‘int’>

  `rhf`

    Values must be of type <class ‘int’>

  `rho`

    Values must be of type <class ‘int’>

  `rightFooterEvenPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `rightFooterFirstPage`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `rightFooterOddPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `rightHeaderEvenPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `rightHeaderFirstPage`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `rightHeaderOddPages`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.chartsheet.relation.``SheetBackgroundPicture`(id)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘str’>

  `tagname` = 'picture'

openpyxl.chartsheet.views module

class `openpyxl.chartsheet.views.``ChartsheetView`(tabSelected=None, zoomScale=None, workbookViewId=0, zoomToFit=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `tabSelected`

    Values must be of type <class ‘bool’>

  `tagname` = 'sheetView'
  `workbookViewId`

    Values must be of type <class ‘int’>

  `zoomScale`

    Values must be of type <class ‘int’>

  `zoomToFit`

    Values must be of type <class ‘bool’>

class `openpyxl.chartsheet.views.``ChartsheetViewList`(sheetView=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `sheetView`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'sheetViews'

###### openpyxl.comments package

Submodules
openpyxl.comments.author module

class `openpyxl.comments.author.``AuthorList`(author=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `author`

    A sequence (list or tuple) that may only contain objects of the declared type

  `authors`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'authors'

openpyxl.comments.comment_sheet module

class `openpyxl.comments.comment_sheet.``CommentRecord`(ref='', authorId=0, guid=None, shapeId=0, text=None, commentPr=None, author=None, height=79, width=144)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `author`

    Values must be of type <class ‘str’>

  `authorId`

    Values must be of type <class ‘int’>

  `commentPr`

    Values must be of type <class ‘openpyxl.comments.comment_sheet.Properties’>

  `content`

    Remove all inline formatting and stuff

  classmethod `from_cell`(cell)

    Class method to convert cell comment

  `guid`
  `ref`

    Values must be of type <class ‘str’>

  `shapeId`

    Values must be of type <class ‘int’>

  `tagname` = 'comment'
  `text`

    Values must be of type <class ‘openpyxl.cell.text.Text’>

class `openpyxl.comments.comment_sheet.``CommentSheet`(authors=None, commentList=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `authors`

    Values must be of type <class ‘openpyxl.comments.author.AuthorList’>

  `commentList`

    Wrap a sequence in an containing object

  `comments`

    Return a dictionary of comments keyed by coord

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  classmethod `from_comments`(comments)

    Create a comment sheet from a list of comments for a particular worksheet

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml'
  `path`

    Return path within the archive

  `tagname` = 'comments'
  `to_tree`()
  `write_shapes`(vml=None)

    Create the VML for comments

class `openpyxl.comments.comment_sheet.``Properties`(locked=None, defaultSize=None, _print=None, disabled=None, uiObject=None, autoFill=None, autoLine=None, altText=None, textHAlign=None, textVAlign=None, lockText=None, justLastX=None, autoScale=None, rowHidden=None, colHidden=None, anchor=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `altText`

    Values must be of type <class ‘str’>

  `autoFill`

    Values must be of type <class ‘bool’>

  `autoLine`

    Values must be of type <class ‘bool’>

  `autoScale`

    Values must be of type <class ‘bool’>

  `colHidden`

    Values must be of type <class ‘bool’>

  `defaultSize`

    Values must be of type <class ‘bool’>

  `disabled`

    Values must be of type <class ‘bool’>

  `justLastX`

    Values must be of type <class ‘bool’>

  `lockText`

    Values must be of type <class ‘bool’>

  `locked`

    Values must be of type <class ‘bool’>

  `rowHidden`

    Values must be of type <class ‘bool’>

  `textHAlign`

    Value must be one of {‘left’, ‘justify’, ‘distributed’, ‘right’, ‘center’}

  `textVAlign`

    Value must be one of {‘justify’, ‘bottom’, ‘distributed’, ‘top’, ‘center’}

  `uiObject`

    Values must be of type <class ‘bool’>

openpyxl.comments.comments module

class `openpyxl.comments.comments.``Comment`(text, author, height=79, width=144)

  Bases: `object`

  `bind`(cell)

    Bind comment to a particular cell

  `parent`
  `text`

    Any comment text stripped of all formatting.

  `unbind`()

    Unbind a comment from a cell

openpyxl.comments.shape_writer module

class `openpyxl.comments.shape_writer.``ShapeWriter`(comments)

  Bases: `object`

  Create VML for comments

  `add_comment_shape`(root, idx, coord, height, width)
  `add_comment_shapetype`(root)
  `vml` = None
  `vml_path` = None
  `write`(root)

###### openpyxl.descriptors package

class `openpyxl.descriptors.``MetaSerialisable`

  Bases: `type`

class `openpyxl.descriptors.``MetaStrict`

  Bases: `type`

class `openpyxl.descriptors.``Strict`

  Bases: `object`

Submodules
openpyxl.descriptors.base module

Based on Python Cookbook 3rd Edition, 8.13 http://chimera.labs.oreilly.com/books/1230000000393/ch08.html#_discussiuncion_130

class `openpyxl.descriptors.base.``ASCII`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  `expected_type`

    alias of `builtins.bytes`

class `openpyxl.descriptors.base.``Alias`(alias)

  Bases: `openpyxl.descriptors.base.Descriptor`

  Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.descriptors.base.``Bool`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Convertible`

  `expected_type`

    alias of `builtins.bool`

class `openpyxl.descriptors.base.``Convertible`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  Values must be convertible to a particular type

class `openpyxl.descriptors.base.``DateTime`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  `expected_type`

    alias of `datetime.datetime`

class `openpyxl.descriptors.base.``Default`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  When called returns an instance of the expected type. Additional default values can be passed in to the descriptor

class `openpyxl.descriptors.base.``Descriptor`(name=None, **kw)

  Bases: `object`

class `openpyxl.descriptors.base.``Float`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Convertible`

  `expected_type`

    alias of `builtins.float`

class `openpyxl.descriptors.base.``Integer`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Convertible`

  `expected_type`

    alias of `builtins.int`

class `openpyxl.descriptors.base.``Length`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.Descriptor`

class `openpyxl.descriptors.base.``MatchPattern`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.Descriptor`

  Values must match a regex pattern

  `allow_none` = False

class `openpyxl.descriptors.base.``Max`(**kw)

  Bases: `openpyxl.descriptors.base.Convertible`

  Values must be less than a max value

  `allow_none` = False
  `expected_type`

    alias of `builtins.float`

class `openpyxl.descriptors.base.``Min`(**kw)

  Bases: `openpyxl.descriptors.base.Convertible`

  Values must be greater than a min value

  `allow_none` = False
  `expected_type`

    alias of `builtins.float`

class `openpyxl.descriptors.base.``MinMax`(**kw)

  Bases: `openpyxl.descriptors.base.Min`, `openpyxl.descriptors.base.Max`

  Values must be greater than min value and less than a max one

class `openpyxl.descriptors.base.``NoneSet`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.Set`

  ‘none’ will be treated as None

class `openpyxl.descriptors.base.``Set`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.Descriptor`

  Value can only be from a set of know values

class `openpyxl.descriptors.base.``String`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  `expected_type`

    alias of `builtins.str`

class `openpyxl.descriptors.base.``Text`(*args, **kw)

  Bases: `openpyxl.descriptors.base.String`, `openpyxl.descriptors.base.Convertible`

class `openpyxl.descriptors.base.``Tuple`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  `expected_type`

    alias of `builtins.tuple`

class `openpyxl.descriptors.base.``Typed`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Descriptor`

  Values must of a particular type

  `allow_none` = False
  `expected_type`

    alias of `builtins.NoneType`

  `nested` = False

openpyxl.descriptors.excel module

Excel specific descriptors

class `openpyxl.descriptors.excel.``Base64Binary`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.MatchPattern`

  `pattern` = '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'

class `openpyxl.descriptors.excel.``CellRange`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.MatchPattern`

  `allow_none` = True
  `pattern` = '^[$]?([A-Za-z]{1,3})[$]?(\\d+)(:[$]?([A-Za-z]{1,3})[$]?(\\d+)?)?$|^[A-Za-z]{1,3}:[A-Za-z]{1,3}$'

class `openpyxl.descriptors.excel.``Extension`(uri=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `uri`

    Values must be of type <class ‘str’>

class `openpyxl.descriptors.excel.``ExtensionList`(ext=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ext`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.descriptors.excel.``Guid`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.MatchPattern`

  `pattern` = '{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}'

class `openpyxl.descriptors.excel.``HexBinary`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.MatchPattern`

  `pattern` = '[0-9a-fA-F]+$'

class `openpyxl.descriptors.excel.``Percentage`(**kw)

  Bases: `openpyxl.descriptors.base.MinMax`

  `max` = 1000000
  `min` = -1000000
  `pattern` = '((100)|([0-9][0-9]?))(\\.[0-9][0-9]?)?%'

class `openpyxl.descriptors.excel.``Relation`(*args, **kw)

  Bases: `openpyxl.descriptors.base.String`

  `allow_none` = True
  `namespace` = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'

class `openpyxl.descriptors.excel.``TextPoint`(**kw)

  Bases: `openpyxl.descriptors.base.MinMax`

  Size in hundredths of points. In theory other units of measurement can be used but these are unbounded

  `expected_type`

    alias of `builtins.int`

  `max` = 400000
  `min` = -400000

class `openpyxl.descriptors.excel.``UniversalMeasure`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.MatchPattern`

  `pattern` = '[0-9]+(\\.[0-9]+)?(mm|cm|in|pt|pc|pi)'

openpyxl.descriptors.namespace module

`openpyxl.descriptors.namespace.``namespaced`(obj, tagname, namespace=None)

  Utility to create a namespaced tag for an object

openpyxl.descriptors.nested module

Generic serialisable classes

class `openpyxl.descriptors.nested.``EmptyTag`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.Nested`, `openpyxl.descriptors.base.Bool`

  Boolean if a tag exists or not.

  `from_tree`(node)
  `to_tree`(tagname=None, value=None, namespace=None)

class `openpyxl.descriptors.nested.``Nested`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.Descriptor`

  `attribute` = 'val'
  `from_tree`(node)
  `nested` = True
  `to_tree`(tagname=None, value=None, namespace=None)

class `openpyxl.descriptors.nested.``NestedBool`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.NestedValue`, `openpyxl.descriptors.base.Bool`

  `from_tree`(node)

class `openpyxl.descriptors.nested.``NestedFloat`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.NestedValue`, `openpyxl.descriptors.base.Float`

class `openpyxl.descriptors.nested.``NestedInteger`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.NestedValue`, `openpyxl.descriptors.base.Integer`

class `openpyxl.descriptors.nested.``NestedMinMax`(**kw)

  Bases: `openpyxl.descriptors.nested.Nested`, `openpyxl.descriptors.base.MinMax`

class `openpyxl.descriptors.nested.``NestedNoneSet`(name=None, **kw)

  Bases: `openpyxl.descriptors.nested.Nested`, `openpyxl.descriptors.base.NoneSet`

class `openpyxl.descriptors.nested.``NestedSet`(name=None, **kw)

  Bases: `openpyxl.descriptors.nested.Nested`, `openpyxl.descriptors.base.Set`

class `openpyxl.descriptors.nested.``NestedString`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.NestedValue`, `openpyxl.descriptors.base.String`

class `openpyxl.descriptors.nested.``NestedText`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.NestedValue`

  Represents any nested tag with the value as the contents of the tag

  `from_tree`(node)
  `to_tree`(tagname=None, value=None, namespace=None)

class `openpyxl.descriptors.nested.``NestedValue`(*args, **kw)

  Bases: `openpyxl.descriptors.nested.Nested`, `openpyxl.descriptors.base.Convertible`

  Nested tag storing the value on the ‘val’ attribute

openpyxl.descriptors.sequence module

class `openpyxl.descriptors.sequence.``MultiSequence`(name=None, **kw)

  Bases: `openpyxl.descriptors.sequence.Sequence`

  Sequences can contain objects with different tags

  `to_tree`(tagname, obj, namespace=None)

    Convert the sequence represented by the descriptor to an XML element

class `openpyxl.descriptors.sequence.``MultiSequencePart`(expected_type, store)

  Bases: `openpyxl.descriptors.base.Alias`

  Allow a multisequence to be built up from parts

  Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

class `openpyxl.descriptors.sequence.``NestedSequence`(name=None, **kw)

  Bases: `openpyxl.descriptors.sequence.Sequence`

  Wrap a sequence in an containing object

  `count` = False
  `from_tree`(node)
  `to_tree`(tagname, obj, namespace=None)

    Convert the sequence represented by the descriptor to an XML element

class `openpyxl.descriptors.sequence.``Sequence`(name=None, **kw)

  Bases: `openpyxl.descriptors.base.Descriptor`

  A sequence (list or tuple) that may only contain objects of the declared type

  `expected_type`

    alias of `builtins.NoneType`

  `idx_base` = 0
  `seq_types` = (<class 'list'>, <class 'tuple'>)
  `to_tree`(tagname, obj, namespace=None)

    Convert the sequence represented by the descriptor to an XML element

  `unique` = False

class `openpyxl.descriptors.sequence.``ValueSequence`(name=None, **kw)

  Bases: `openpyxl.descriptors.sequence.Sequence`

  A sequence of primitive types that are stored as a single attribute. “val” is the default attribute

  `attribute` = 'val'
  `from_tree`(node)
  `to_tree`(tagname, obj, namespace=None)

    Convert the sequence represented by the descriptor to an XML element

openpyxl.descriptors.serialisable module

class `openpyxl.descriptors.serialisable.``Serialisable`

  Bases: `openpyxl.descriptors._Serialisable`

  Objects can serialise to XML their attributes and child objects. The following class attributes are created by the metaclass at runtime: __attrs__ = attributes __nested__ = single-valued child treated as an attribute __elements__ = child elements

  classmethod `from_tree`(node)

    Create object from XML

  `idx_base` = 0
  `namespace` = None
  `tagname`
  `to_tree`(tagname=None, idx=None, namespace=None)

###### openpyxl.drawing package

Submodules
openpyxl.drawing.colors module

class `openpyxl.drawing.colors.``ColorChoice`(scrgbClr=None, srgbClr=None, hslClr=None, sysClr=None, schemeClr=None, prstClr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `RGB`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `RGBPercent`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `hslClr`

    Values must be of type <class ‘openpyxl.drawing.colors.HSLColor’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `prstClr`

    Value must be one of {‘lavender’, ‘goldenrod’, ‘lightCyan’, ‘mediumSlateBlue’, ‘lavenderBlush’, ‘dkOliveGreen’, ‘cadetBlue’, ‘cyan’, ‘lightSalmon’, ‘bisque’, ‘blanchedAlmond’, ‘deepSkyBlue’, ‘peru’, ‘darkSeaGreen’, ‘medBlue’, ‘darkOrange’, ‘darkBlue’, ‘ltSeaGreen’, ‘dkKhaki’, ‘indianRed’, ‘whiteSmoke’, ‘magenta’, ‘green’, ‘lightBlue’, ‘darkTurquoise’, ‘slateGray’, ‘azure’, ‘fuchsia’, ‘medSlateBlue’, ‘lightGoldenrodYellow’, ‘dkGrey’, ‘dkSalmon’, ‘midnightBlue’, ‘red’, ‘mediumOrchid’, ‘peachPuff’, ‘lightGreen’, ‘hotPink’, ‘paleTurquoise’, ‘skyBlue’, ‘ltPink’, ‘rosyBrown’, ‘lightSlateGrey’, ‘lightPink’, ‘ltSkyBlue’, ‘papayaWhip’, ‘cornflowerBlue’, ‘mediumBlue’, ‘chartreuse’, ‘lime’, ‘gainsboro’, ‘lightSeaGreen’, ‘darkOliveGreen’, ‘olive’, ‘paleVioletRed’, ‘darkGray’, ‘dkMagenta’, ‘plum’, ‘mediumPurple’, ‘mistyRose’, ‘darkCyan’, ‘royalBlue’, ‘turquoise’, ‘ghostWhite’, ‘pink’, ‘deepPink’, ‘greenYellow’, ‘medPurple’, ‘darkGrey’, ‘ltGray’, ‘lemonChiffon’, ‘seaGreen’, ‘coral’, ‘grey’, ‘thistle’, ‘crimson’, ‘dkGray’, ‘medSpringGreen’, ‘purple’, ‘forestGreen’, ‘blue’, ‘darkGoldenrod’, ‘darkGreen’, ‘dkSlateBlue’, ‘darkSlateGrey’, ‘dkTurquoise’, ‘lightSteelBlue’, ‘sandyBrown’, ‘teal’, ‘maroon’, ‘brown’, ‘burlyWood’, ‘mediumVioletRed’, ‘orange’, ‘dkRed’, ‘lightSkyBlue’, ‘darkViolet’, ‘paleGoldenrod’, ‘dkSlateGray’, ‘dkCyan’, ‘ltYellow’, ‘darkSlateGray’, ‘dkViolet’, ‘ltCoral’, ‘lightGrey’, ‘moccasin’, ‘yellowGreen’, ‘ltSlateGrey’, ‘floralWhite’, ‘lightGray’, ‘ltSalmon’, ‘wheat’, ‘salmon’, ‘dimGrey’, ‘ltBlue’, ‘dkGreen’, ‘honeydew’, ‘orangeRed’, ‘medAquamarine’, ‘navy’, ‘orchid’, ‘aliceBlue’, ‘dkOrchid’, ‘yellow’, ‘cornsilk’, ‘lightYellow’, ‘sienna’, ‘white’, ‘ltGrey’, ‘firebrick’, ‘dkOrange’, ‘blueViolet’, ‘powderBlue’, ‘slateGrey’, ‘violet’, ‘ltGoldenrodYellow’, ‘springGreen’, ‘beige’, ‘gray’, ‘saddleBrown’, ‘lightSlateGray’, ‘oliveDrab’, ‘darkSlateBlue’, ‘ltGreen’, ‘antiqueWhite’, ‘ivory’, ‘khaki’, ‘indigo’, ‘black’, ‘lawnGreen’, ‘darkKhaki’, ‘medSeaGreen’, ‘slateBlue’, ‘chocolate’, ‘mediumTurquoise’, ‘mediumSpringGreen’, ‘dkSeaGreen’, ‘tan’, ‘darkSalmon’, ‘navajoWhite’, ‘mediumSeaGreen’, ‘gold’, ‘aqua’, ‘dkGoldenrod’, ‘darkRed’, ‘medVioletRed’, ‘ltSlateGray’, ‘dkBlue’, ‘ltCyan’, ‘tomato’, ‘dimGray’, ‘limeGreen’, ‘lightCoral’, ‘oldLace’, ‘mediumAquamarine’, ‘darkMagenta’, ‘dkSlateGrey’, ‘medTurquoise’, ‘linen’, ‘snow’, ‘aquamarine’, ‘ltSteelBlue’, ‘paleGreen’, ‘medOrchid’, ‘dodgerBlue’, ‘seaShell’, ‘silver’, ‘steelBlue’, ‘mintCream’, ‘darkOrchid’}

  `schemeClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SchemeColor’>

  `scrgbClr`

    Values must be of type <class ‘openpyxl.drawing.colors.RGBPercent’>

  `srgbClr`

    Values must be of type <class ‘str’>

  `sysClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SystemColor’>

  `tagname` = 'colorChoice'

class `openpyxl.drawing.colors.``ColorChoiceDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  Objects can choose from 7 different kinds of color system. Assume RGBHex if a string is passed in.

  `allow_none` = True
  `expected_type`

    alias of `ColorChoice`

class `openpyxl.drawing.colors.``ColorMapping`(bg1='lt1', tx1='dk1', bg2='lt2', tx2='dk2', accent1='accent1', accent2='accent2', accent3='accent3', accent4='accent4', accent5='accent5', accent6='accent6', hlink='hlink', folHlink='folHlink', extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `accent1`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `accent2`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `accent3`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `accent4`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `accent5`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `accent6`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `bg1`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `bg2`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `folHlink`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `hlink`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `tagname` = 'clrMapOvr'
  `tx1`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

  `tx2`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘dk2’, ‘accent5’, ‘accent1’, ‘accent4’, ‘accent6’, ‘hlink’, ‘folHlink’, ‘dk1’}

class `openpyxl.drawing.colors.``HSLColor`(hue=None, sat=None, lum=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `hue`

    Values must be of type <class ‘int’>

  `lum`

    Values must be of type <class ‘float’>

  `sat`

    Values must be of type <class ‘float’>

  `tagname` = 'hslClr'

class `openpyxl.drawing.colors.``RGBPercent`(r=None, g=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Values must be of type <class ‘float’>

  `g`

    Values must be of type <class ‘float’>

  `r`

    Values must be of type <class ‘float’>

  `tagname` = 'rgbClr'

class `openpyxl.drawing.colors.``SchemeColor`(tint=None, shade=None, comp=None, inv=None, gray=None, alpha=None, alphaOff=None, alphaMod=None, hue=None, hueOff=None, hueMod=None, sat=None, satOff=None, satMod=None, lum=None, lumOff=None, lumMod=None, red=None, redOff=None, redMod=None, green=None, greenOff=None, greenMod=None, blue=None, blueOff=None, blueMod=None, gamma=None, invGamma=None, val=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alpha`

    Values must be of type <class ‘int’>

  `alphaMod`

    Values must be of type <class ‘int’>

  `alphaOff`

    Values must be of type <class ‘int’>

  `blue`

    Values must be of type <class ‘int’>

  `blueMod`

    Values must be of type <class ‘int’>

  `blueOff`

    Values must be of type <class ‘int’>

  `comp`

    Values must be of type <class ‘bool’>

  `gamma`

    Values must be of type <class ‘bool’>

  `gray`

    Values must be of type <class ‘int’>

  `green`

    Values must be of type <class ‘int’>

  `greenMod`

    Values must be of type <class ‘int’>

  `greenOff`

    Values must be of type <class ‘int’>

  `hue`

    Values must be of type <class ‘int’>

  `hueMod`

    Values must be of type <class ‘int’>

  `hueOff`

    Values must be of type <class ‘int’>

  `inv`

    Values must be of type <class ‘int’>

  `invGamma`

    Values must be of type <class ‘bool’>

  `lum`

    Values must be of type <class ‘int’>

  `lumMod`

    Values must be of type <class ‘int’>

  `lumOff`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `red`

    Values must be of type <class ‘int’>

  `redMod`

    Values must be of type <class ‘int’>

  `redOff`

    Values must be of type <class ‘int’>

  `sat`

    Values must be of type <class ‘int’>

  `satMod`

    Values must be of type <class ‘int’>

  `satOff`

    Values must be of type <class ‘int’>

  `shade`

    Values must be of type <class ‘int’>

  `tagname` = 'schemeClr'
  `tint`

    Values must be of type <class ‘int’>

  `val`

    Value must be one of {‘lt2’, ‘accent3’, ‘lt1’, ‘accent2’, ‘tx1’, ‘dk2’, ‘bg2’, ‘accent5’, ‘tx2’, ‘accent1’, ‘phClr’, ‘accent4’, ‘accent6’, ‘bg1’, ‘hlink’, ‘folHlink’, ‘dk1’}

class `openpyxl.drawing.colors.``SystemColor`(val='windowText', lastClr=None, tint=None, shade=None, comp=None, inv=None, gray=None, alpha=None, alphaOff=None, alphaMod=None, hue=None, hueOff=None, hueMod=None, sat=None, satOff=None, satMod=None, lum=None, lumOff=None, lumMod=None, red=None, redOff=None, redMod=None, green=None, greenOff=None, greenMod=None, blue=None, blueOff=None, blueMod=None, gamma=None, invGamma=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alpha`

    Values must be of type <class ‘int’>

  `alphaMod`

    Values must be of type <class ‘int’>

  `alphaOff`

    Values must be of type <class ‘int’>

  `blue`

    Values must be of type <class ‘int’>

  `blueMod`

    Values must be of type <class ‘int’>

  `blueOff`

    Values must be of type <class ‘int’>

  `comp`

    Values must be of type <class ‘openpyxl.drawing.colors.Transform’>

  `gamma`

    Values must be of type <class ‘openpyxl.drawing.colors.Transform’>

  `gray`

    Values must be of type <class ‘openpyxl.drawing.colors.Transform’>

  `green`

    Values must be of type <class ‘int’>

  `greenMod`

    Values must be of type <class ‘int’>

  `greenOff`

    Values must be of type <class ‘int’>

  `hue`

    Values must be of type <class ‘int’>

  `hueMod`

    Values must be of type <class ‘int’>

  `hueOff`

    Values must be of type <class ‘int’>

  `inv`

    Values must be of type <class ‘openpyxl.drawing.colors.Transform’>

  `invGamma`

    Values must be of type <class ‘openpyxl.drawing.colors.Transform’>

  `lastClr`

    Values must be of type <class ‘str’>

  `lum`

    Values must be of type <class ‘int’>

  `lumMod`

    Values must be of type <class ‘int’>

  `lumOff`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `red`

    Values must be of type <class ‘int’>

  `redMod`

    Values must be of type <class ‘int’>

  `redOff`

    Values must be of type <class ‘int’>

  `sat`

    Values must be of type <class ‘int’>

  `satMod`

    Values must be of type <class ‘int’>

  `satOff`

    Values must be of type <class ‘int’>

  `shade`

    Values must be of type <class ‘int’>

  `tagname` = 'sysClr'
  `tint`

    Values must be of type <class ‘int’>

  `val`

    Value must be one of {‘gradientActiveCaption’, ‘background’, ‘activeBorder’, ‘inactiveCaptionText’, ‘gradientInactiveCaption’, ‘3dLight’, ‘captionText’, ‘menuBar’, ‘btnFace’, ‘3dDkShadow’, ‘grayText’, ‘menuHighlight’, ‘inactiveCaption’, ‘btnText’, ‘window’, ‘infoBk’, ‘appWorkspace’, ‘menuText’, ‘activeCaption’, ‘windowText’, ‘hotLight’, ‘highlight’, ‘infoText’, ‘menu’, ‘btnShadow’, ‘highlightText’, ‘windowFrame’, ‘btnHighlight’, ‘scrollBar’, ‘inactiveBorder’}

class `openpyxl.drawing.colors.``Transform`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

openpyxl.drawing.connector module

class `openpyxl.drawing.connector.``Connection`(id=None, idx=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘int’>

  `idx`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.connector.``ConnectorLocking`(extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

class `openpyxl.drawing.connector.``ConnectorNonVisual`(cNvPr=None, cNvCxnSpPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cNvCxnSpPr`

    Values must be of type <class ‘openpyxl.drawing.connector.NonVisualConnectorProperties’>

  `cNvPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualDrawingProps’>

class `openpyxl.drawing.connector.``ConnectorShape`(nvCxnSpPr=None, spPr=None, style=None, macro=None, fPublished=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fPublished`

    Values must be of type <class ‘bool’>

  `macro`

    Values must be of type <class ‘str’>

  `nvCxnSpPr`

    Values must be of type <class ‘openpyxl.drawing.connector.ConnectorNonVisual’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `style`

    Values must be of type <class ‘openpyxl.drawing.geometry.ShapeStyle’>

  `tagname` = 'cxnSp'

class `openpyxl.drawing.connector.``NonVisualConnectorProperties`(cxnSpLocks=None, stCxn=None, endCxn=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cxnSpLocks`

    Values must be of type <class ‘openpyxl.drawing.connector.ConnectorLocking’>

  `endCxn`

    Values must be of type <class ‘openpyxl.drawing.connector.Connection’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `stCxn`

    Values must be of type <class ‘openpyxl.drawing.connector.Connection’>

class `openpyxl.drawing.connector.``Shape`(macro=None, textlink=None, fPublished=None, fLocksText=None, nvSpPr=None, spPr=None, style=None, txBody=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fLocksText`

    Values must be of type <class ‘bool’>

  `fPublished`

    Values must be of type <class ‘bool’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `macro`

    Values must be of type <class ‘str’>

  `meta`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `nvSpPr`

    Values must be of type <class ‘openpyxl.drawing.connector.ShapeMeta’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `style`

    Values must be of type <class ‘openpyxl.drawing.geometry.ShapeStyle’>

  `textlink`

    Values must be of type <class ‘str’>

  `txBody`

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class `openpyxl.drawing.connector.``ShapeMeta`(cNvPr=None, cNvSpPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cNvPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualDrawingProps’>

  `cNvSpPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualDrawingShapeProps’>

  `tagname` = 'nvSpPr'

openpyxl.drawing.drawing module

class `openpyxl.drawing.drawing.``Drawing`

  Bases: `object`

  a drawing object - eg container for shapes or charts we assume user specifies dimensions in pixels; units are converted to EMU in the drawing part

  `anchor`
  `count` = 0
  `get_emu_dimensions`()

    return (x, y, w, h) in EMU

    Note

    Deprecated: Private method used when serialising

  `height`
  `set_dimension`(w=0, h=0)
  `width`

openpyxl.drawing.effect module

class `openpyxl.drawing.effect.``AlphaBiLevelEffect`(thresh=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `thresh`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.effect.``AlphaCeilingEffect`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.drawing.effect.``AlphaFloorEffect`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.drawing.effect.``AlphaInverseEffect`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.drawing.effect.``AlphaModulateEffect`(cont=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cont`

    Values must be of type <class ‘openpyxl.drawing.effect.EffectContainer’>

class `openpyxl.drawing.effect.``AlphaModulateFixedEffect`(amt=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `amt`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.effect.``AlphaReplaceEffect`(a=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `a`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.effect.``BiLevelEffect`(thresh=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `thresh`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.effect.``BlurEffect`(rad=None, grow=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `grow`

    Values must be of type <class ‘bool’>

  `rad`

    Values must be of type <class ‘float’>

class `openpyxl.drawing.effect.``Color`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.drawing.effect.``ColorChangeEffect`(useA=None, clrFrom=None, clrTo=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `clrFrom`

    Values must be of type <class ‘openpyxl.drawing.effect.Color’>

  `clrTo`

    Values must be of type <class ‘openpyxl.drawing.effect.Color’>

  `useA`

    Values must be of type <class ‘bool’>

class `openpyxl.drawing.effect.``ColorReplaceEffect`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.drawing.effect.``DuotoneEffect`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.drawing.effect.``EffectContainer`(type=None, name=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `type`

    Value must be one of {‘tree’, ‘sib’}

class `openpyxl.drawing.effect.``EffectList`(blur=None, fillOverlay=None, glow=None, innerShdw=None, outerShdw=None, prstShdw=None, reflection=None, softEdge=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `blur`

    Values must be of type <class ‘openpyxl.drawing.effect.BlurEffect’>

  `fillOverlay`

    Values must be of type <class ‘openpyxl.drawing.effect.FillOverlayEffect’>

  `glow`

    Values must be of type <class ‘openpyxl.drawing.effect.GlowEffect’>

  `innerShdw`

    Values must be of type <class ‘openpyxl.drawing.effect.InnerShadowEffect’>

  `outerShdw`

    Values must be of type <class ‘openpyxl.drawing.effect.OuterShadow’>

  `prstShdw`

    Values must be of type <class ‘openpyxl.drawing.effect.PresetShadowEffect’>

  `reflection`

    Values must be of type <class ‘openpyxl.drawing.effect.ReflectionEffect’>

  `softEdge`

    Values must be of type <class ‘openpyxl.drawing.effect.SoftEdgesEffect’>

class `openpyxl.drawing.effect.``FillOverlayEffect`(blend=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `blend`

    Value must be one of {‘darken’, ‘screen’, ‘mult’, ‘lighten’, ‘over’}

class `openpyxl.drawing.effect.``GlowEffect`(rad=None, **kw)

  Bases: `openpyxl.drawing.colors.ColorChoice`

  `hslClr`

    Values must be of type <class ‘openpyxl.drawing.colors.HSLColor’>

  `prstClr`

    Value must be one of {‘lavender’, ‘goldenrod’, ‘lightCyan’, ‘mediumSlateBlue’, ‘lavenderBlush’, ‘dkOliveGreen’, ‘cadetBlue’, ‘cyan’, ‘lightSalmon’, ‘bisque’, ‘blanchedAlmond’, ‘deepSkyBlue’, ‘peru’, ‘darkSeaGreen’, ‘medBlue’, ‘darkOrange’, ‘darkBlue’, ‘ltSeaGreen’, ‘dkKhaki’, ‘indianRed’, ‘whiteSmoke’, ‘magenta’, ‘green’, ‘lightBlue’, ‘darkTurquoise’, ‘slateGray’, ‘azure’, ‘fuchsia’, ‘medSlateBlue’, ‘lightGoldenrodYellow’, ‘dkGrey’, ‘dkSalmon’, ‘midnightBlue’, ‘red’, ‘mediumOrchid’, ‘peachPuff’, ‘lightGreen’, ‘hotPink’, ‘paleTurquoise’, ‘skyBlue’, ‘ltPink’, ‘rosyBrown’, ‘lightSlateGrey’, ‘lightPink’, ‘ltSkyBlue’, ‘papayaWhip’, ‘cornflowerBlue’, ‘mediumBlue’, ‘chartreuse’, ‘lime’, ‘gainsboro’, ‘lightSeaGreen’, ‘darkOliveGreen’, ‘olive’, ‘paleVioletRed’, ‘darkGray’, ‘dkMagenta’, ‘plum’, ‘mediumPurple’, ‘mistyRose’, ‘darkCyan’, ‘royalBlue’, ‘turquoise’, ‘ghostWhite’, ‘pink’, ‘deepPink’, ‘greenYellow’, ‘medPurple’, ‘darkGrey’, ‘ltGray’, ‘lemonChiffon’, ‘seaGreen’, ‘coral’, ‘grey’, ‘thistle’, ‘crimson’, ‘dkGray’, ‘medSpringGreen’, ‘purple’, ‘forestGreen’, ‘blue’, ‘darkGoldenrod’, ‘darkGreen’, ‘dkSlateBlue’, ‘darkSlateGrey’, ‘dkTurquoise’, ‘lightSteelBlue’, ‘sandyBrown’, ‘teal’, ‘maroon’, ‘brown’, ‘burlyWood’, ‘mediumVioletRed’, ‘orange’, ‘dkRed’, ‘lightSkyBlue’, ‘darkViolet’, ‘paleGoldenrod’, ‘dkSlateGray’, ‘dkCyan’, ‘ltYellow’, ‘darkSlateGray’, ‘dkViolet’, ‘ltCoral’, ‘lightGrey’, ‘moccasin’, ‘yellowGreen’, ‘ltSlateGrey’, ‘floralWhite’, ‘lightGray’, ‘ltSalmon’, ‘wheat’, ‘salmon’, ‘dimGrey’, ‘ltBlue’, ‘dkGreen’, ‘honeydew’, ‘orangeRed’, ‘medAquamarine’, ‘navy’, ‘orchid’, ‘aliceBlue’, ‘dkOrchid’, ‘yellow’, ‘cornsilk’, ‘lightYellow’, ‘sienna’, ‘white’, ‘ltGrey’, ‘firebrick’, ‘dkOrange’, ‘blueViolet’, ‘powderBlue’, ‘slateGrey’, ‘violet’, ‘ltGoldenrodYellow’, ‘springGreen’, ‘beige’, ‘gray’, ‘saddleBrown’, ‘lightSlateGray’, ‘oliveDrab’, ‘darkSlateBlue’, ‘ltGreen’, ‘antiqueWhite’, ‘ivory’, ‘khaki’, ‘indigo’, ‘black’, ‘lawnGreen’, ‘darkKhaki’, ‘medSeaGreen’, ‘slateBlue’, ‘chocolate’, ‘mediumTurquoise’, ‘mediumSpringGreen’, ‘dkSeaGreen’, ‘tan’, ‘darkSalmon’, ‘navajoWhite’, ‘mediumSeaGreen’, ‘gold’, ‘aqua’, ‘dkGoldenrod’, ‘darkRed’, ‘medVioletRed’, ‘ltSlateGray’, ‘dkBlue’, ‘ltCyan’, ‘tomato’, ‘dimGray’, ‘limeGreen’, ‘lightCoral’, ‘oldLace’, ‘mediumAquamarine’, ‘darkMagenta’, ‘dkSlateGrey’, ‘medTurquoise’, ‘linen’, ‘snow’, ‘aquamarine’, ‘ltSteelBlue’, ‘paleGreen’, ‘medOrchid’, ‘dodgerBlue’, ‘seaShell’, ‘silver’, ‘steelBlue’, ‘mintCream’, ‘darkOrchid’}

  `rad`

    Values must be of type <class ‘float’>

  `schemeClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SchemeColor’>

  `scrgbClr`

    Values must be of type <class ‘openpyxl.drawing.colors.RGBPercent’>

  `srgbClr`

    Values must be of type <class ‘str’>

  `sysClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SystemColor’>

class `openpyxl.drawing.effect.``GrayscaleEffect`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tagname` = 'grayscl'

class `openpyxl.drawing.effect.``HSLEffect`(hue=None, sat=None, lum=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `hue`

    Values must be of type <class ‘int’>

  `lum`

    Values must be of type <class ‘int’>

  `sat`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.effect.``InnerShadowEffect`(blurRad=None, dist=None, dir=None, **kw)

  Bases: `openpyxl.drawing.colors.ColorChoice`

  `blurRad`

    Values must be of type <class ‘float’>

  `dir`

    Values must be of type <class ‘int’>

  `dist`

    Values must be of type <class ‘float’>

  `hslClr`

    Values must be of type <class ‘openpyxl.drawing.colors.HSLColor’>

  `prstClr`

    Value must be one of {‘lavender’, ‘goldenrod’, ‘lightCyan’, ‘mediumSlateBlue’, ‘lavenderBlush’, ‘dkOliveGreen’, ‘cadetBlue’, ‘cyan’, ‘lightSalmon’, ‘bisque’, ‘blanchedAlmond’, ‘deepSkyBlue’, ‘peru’, ‘darkSeaGreen’, ‘medBlue’, ‘darkOrange’, ‘darkBlue’, ‘ltSeaGreen’, ‘dkKhaki’, ‘indianRed’, ‘whiteSmoke’, ‘magenta’, ‘green’, ‘lightBlue’, ‘darkTurquoise’, ‘slateGray’, ‘azure’, ‘fuchsia’, ‘medSlateBlue’, ‘lightGoldenrodYellow’, ‘dkGrey’, ‘dkSalmon’, ‘midnightBlue’, ‘red’, ‘mediumOrchid’, ‘peachPuff’, ‘lightGreen’, ‘hotPink’, ‘paleTurquoise’, ‘skyBlue’, ‘ltPink’, ‘rosyBrown’, ‘lightSlateGrey’, ‘lightPink’, ‘ltSkyBlue’, ‘papayaWhip’, ‘cornflowerBlue’, ‘mediumBlue’, ‘chartreuse’, ‘lime’, ‘gainsboro’, ‘lightSeaGreen’, ‘darkOliveGreen’, ‘olive’, ‘paleVioletRed’, ‘darkGray’, ‘dkMagenta’, ‘plum’, ‘mediumPurple’, ‘mistyRose’, ‘darkCyan’, ‘royalBlue’, ‘turquoise’, ‘ghostWhite’, ‘pink’, ‘deepPink’, ‘greenYellow’, ‘medPurple’, ‘darkGrey’, ‘ltGray’, ‘lemonChiffon’, ‘seaGreen’, ‘coral’, ‘grey’, ‘thistle’, ‘crimson’, ‘dkGray’, ‘medSpringGreen’, ‘purple’, ‘forestGreen’, ‘blue’, ‘darkGoldenrod’, ‘darkGreen’, ‘dkSlateBlue’, ‘darkSlateGrey’, ‘dkTurquoise’, ‘lightSteelBlue’, ‘sandyBrown’, ‘teal’, ‘maroon’, ‘brown’, ‘burlyWood’, ‘mediumVioletRed’, ‘orange’, ‘dkRed’, ‘lightSkyBlue’, ‘darkViolet’, ‘paleGoldenrod’, ‘dkSlateGray’, ‘dkCyan’, ‘ltYellow’, ‘darkSlateGray’, ‘dkViolet’, ‘ltCoral’, ‘lightGrey’, ‘moccasin’, ‘yellowGreen’, ‘ltSlateGrey’, ‘floralWhite’, ‘lightGray’, ‘ltSalmon’, ‘wheat’, ‘salmon’, ‘dimGrey’, ‘ltBlue’, ‘dkGreen’, ‘honeydew’, ‘orangeRed’, ‘medAquamarine’, ‘navy’, ‘orchid’, ‘aliceBlue’, ‘dkOrchid’, ‘yellow’, ‘cornsilk’, ‘lightYellow’, ‘sienna’, ‘white’, ‘ltGrey’, ‘firebrick’, ‘dkOrange’, ‘blueViolet’, ‘powderBlue’, ‘slateGrey’, ‘violet’, ‘ltGoldenrodYellow’, ‘springGreen’, ‘beige’, ‘gray’, ‘saddleBrown’, ‘lightSlateGray’, ‘oliveDrab’, ‘darkSlateBlue’, ‘ltGreen’, ‘antiqueWhite’, ‘ivory’, ‘khaki’, ‘indigo’, ‘black’, ‘lawnGreen’, ‘darkKhaki’, ‘medSeaGreen’, ‘slateBlue’, ‘chocolate’, ‘mediumTurquoise’, ‘mediumSpringGreen’, ‘dkSeaGreen’, ‘tan’, ‘darkSalmon’, ‘navajoWhite’, ‘mediumSeaGreen’, ‘gold’, ‘aqua’, ‘dkGoldenrod’, ‘darkRed’, ‘medVioletRed’, ‘ltSlateGray’, ‘dkBlue’, ‘ltCyan’, ‘tomato’, ‘dimGray’, ‘limeGreen’, ‘lightCoral’, ‘oldLace’, ‘mediumAquamarine’, ‘darkMagenta’, ‘dkSlateGrey’, ‘medTurquoise’, ‘linen’, ‘snow’, ‘aquamarine’, ‘ltSteelBlue’, ‘paleGreen’, ‘medOrchid’, ‘dodgerBlue’, ‘seaShell’, ‘silver’, ‘steelBlue’, ‘mintCream’, ‘darkOrchid’}

  `schemeClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SchemeColor’>

  `scrgbClr`

    Values must be of type <class ‘openpyxl.drawing.colors.RGBPercent’>

  `srgbClr`

    Values must be of type <class ‘str’>

  `sysClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SystemColor’>

class `openpyxl.drawing.effect.``LuminanceEffect`(bright=0, contrast=0)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `bright`

    Values must be of type <class ‘int’>

  `contrast`

    Values must be of type <class ‘int’>

  `tagname` = 'lum'

class `openpyxl.drawing.effect.``OuterShadow`(blurRad=None, dist=None, dir=None, sx=None, sy=None, kx=None, ky=None, algn=None, rotWithShape=None, **kw)

  Bases: `openpyxl.drawing.colors.ColorChoice`

  `algn`

    Value must be one of {‘ctr’, ‘t’, ‘r’, ‘bl’, ‘br’, ‘tl’, ‘b’, ‘tr’, ‘l’}

  `blurRad`

    Values must be of type <class ‘float’>

  `dir`

    Values must be of type <class ‘int’>

  `dist`

    Values must be of type <class ‘float’>

  `hslClr`

    Values must be of type <class ‘openpyxl.drawing.colors.HSLColor’>

  `kx`

    Values must be of type <class ‘int’>

  `ky`

    Values must be of type <class ‘int’>

  `prstClr`

    Value must be one of {‘lavender’, ‘goldenrod’, ‘lightCyan’, ‘mediumSlateBlue’, ‘lavenderBlush’, ‘dkOliveGreen’, ‘cadetBlue’, ‘cyan’, ‘lightSalmon’, ‘bisque’, ‘blanchedAlmond’, ‘deepSkyBlue’, ‘peru’, ‘darkSeaGreen’, ‘medBlue’, ‘darkOrange’, ‘darkBlue’, ‘ltSeaGreen’, ‘dkKhaki’, ‘indianRed’, ‘whiteSmoke’, ‘magenta’, ‘green’, ‘lightBlue’, ‘darkTurquoise’, ‘slateGray’, ‘azure’, ‘fuchsia’, ‘medSlateBlue’, ‘lightGoldenrodYellow’, ‘dkGrey’, ‘dkSalmon’, ‘midnightBlue’, ‘red’, ‘mediumOrchid’, ‘peachPuff’, ‘lightGreen’, ‘hotPink’, ‘paleTurquoise’, ‘skyBlue’, ‘ltPink’, ‘rosyBrown’, ‘lightSlateGrey’, ‘lightPink’, ‘ltSkyBlue’, ‘papayaWhip’, ‘cornflowerBlue’, ‘mediumBlue’, ‘chartreuse’, ‘lime’, ‘gainsboro’, ‘lightSeaGreen’, ‘darkOliveGreen’, ‘olive’, ‘paleVioletRed’, ‘darkGray’, ‘dkMagenta’, ‘plum’, ‘mediumPurple’, ‘mistyRose’, ‘darkCyan’, ‘royalBlue’, ‘turquoise’, ‘ghostWhite’, ‘pink’, ‘deepPink’, ‘greenYellow’, ‘medPurple’, ‘darkGrey’, ‘ltGray’, ‘lemonChiffon’, ‘seaGreen’, ‘coral’, ‘grey’, ‘thistle’, ‘crimson’, ‘dkGray’, ‘medSpringGreen’, ‘purple’, ‘forestGreen’, ‘blue’, ‘darkGoldenrod’, ‘darkGreen’, ‘dkSlateBlue’, ‘darkSlateGrey’, ‘dkTurquoise’, ‘lightSteelBlue’, ‘sandyBrown’, ‘teal’, ‘maroon’, ‘brown’, ‘burlyWood’, ‘mediumVioletRed’, ‘orange’, ‘dkRed’, ‘lightSkyBlue’, ‘darkViolet’, ‘paleGoldenrod’, ‘dkSlateGray’, ‘dkCyan’, ‘ltYellow’, ‘darkSlateGray’, ‘dkViolet’, ‘ltCoral’, ‘lightGrey’, ‘moccasin’, ‘yellowGreen’, ‘ltSlateGrey’, ‘floralWhite’, ‘lightGray’, ‘ltSalmon’, ‘wheat’, ‘salmon’, ‘dimGrey’, ‘ltBlue’, ‘dkGreen’, ‘honeydew’, ‘orangeRed’, ‘medAquamarine’, ‘navy’, ‘orchid’, ‘aliceBlue’, ‘dkOrchid’, ‘yellow’, ‘cornsilk’, ‘lightYellow’, ‘sienna’, ‘white’, ‘ltGrey’, ‘firebrick’, ‘dkOrange’, ‘blueViolet’, ‘powderBlue’, ‘slateGrey’, ‘violet’, ‘ltGoldenrodYellow’, ‘springGreen’, ‘beige’, ‘gray’, ‘saddleBrown’, ‘lightSlateGray’, ‘oliveDrab’, ‘darkSlateBlue’, ‘ltGreen’, ‘antiqueWhite’, ‘ivory’, ‘khaki’, ‘indigo’, ‘black’, ‘lawnGreen’, ‘darkKhaki’, ‘medSeaGreen’, ‘slateBlue’, ‘chocolate’, ‘mediumTurquoise’, ‘mediumSpringGreen’, ‘dkSeaGreen’, ‘tan’, ‘darkSalmon’, ‘navajoWhite’, ‘mediumSeaGreen’, ‘gold’, ‘aqua’, ‘dkGoldenrod’, ‘darkRed’, ‘medVioletRed’, ‘ltSlateGray’, ‘dkBlue’, ‘ltCyan’, ‘tomato’, ‘dimGray’, ‘limeGreen’, ‘lightCoral’, ‘oldLace’, ‘mediumAquamarine’, ‘darkMagenta’, ‘dkSlateGrey’, ‘medTurquoise’, ‘linen’, ‘snow’, ‘aquamarine’, ‘ltSteelBlue’, ‘paleGreen’, ‘medOrchid’, ‘dodgerBlue’, ‘seaShell’, ‘silver’, ‘steelBlue’, ‘mintCream’, ‘darkOrchid’}

  `rotWithShape`

    Values must be of type <class ‘bool’>

  `schemeClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SchemeColor’>

  `scrgbClr`

    Values must be of type <class ‘openpyxl.drawing.colors.RGBPercent’>

  `srgbClr`

    Values must be of type <class ‘str’>

  `sx`

    Values must be of type <class ‘int’>

  `sy`

    Values must be of type <class ‘int’>

  `sysClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SystemColor’>

  `tagname` = 'outerShdw'

class `openpyxl.drawing.effect.``PresetShadowEffect`(prst=None, dist=None, dir=None, **kw)

  Bases: `openpyxl.drawing.colors.ColorChoice`

  `dir`

    Values must be of type <class ‘int’>

  `dist`

    Values must be of type <class ‘float’>

  `hslClr`

    Values must be of type <class ‘openpyxl.drawing.colors.HSLColor’>

  `prst`

    Value must be one of {‘shdw3’, ‘shdw7’, ‘shdw20’, ‘shdw9’, ‘shdw11’, ‘shdw17’, ‘shdw18’, ‘shdw1’, ‘shdw13’, ‘shdw15’, ‘shdw10’, ‘shdw4’, ‘shdw6’, ‘shdw16’, ‘shdw19’, ‘shdw8’, ‘shdw12’, ‘shdw2’, ‘shdw5’, ‘shdw14’}

  `prstClr`

    Value must be one of {‘lavender’, ‘goldenrod’, ‘lightCyan’, ‘mediumSlateBlue’, ‘lavenderBlush’, ‘dkOliveGreen’, ‘cadetBlue’, ‘cyan’, ‘lightSalmon’, ‘bisque’, ‘blanchedAlmond’, ‘deepSkyBlue’, ‘peru’, ‘darkSeaGreen’, ‘medBlue’, ‘darkOrange’, ‘darkBlue’, ‘ltSeaGreen’, ‘dkKhaki’, ‘indianRed’, ‘whiteSmoke’, ‘magenta’, ‘green’, ‘lightBlue’, ‘darkTurquoise’, ‘slateGray’, ‘azure’, ‘fuchsia’, ‘medSlateBlue’, ‘lightGoldenrodYellow’, ‘dkGrey’, ‘dkSalmon’, ‘midnightBlue’, ‘red’, ‘mediumOrchid’, ‘peachPuff’, ‘lightGreen’, ‘hotPink’, ‘paleTurquoise’, ‘skyBlue’, ‘ltPink’, ‘rosyBrown’, ‘lightSlateGrey’, ‘lightPink’, ‘ltSkyBlue’, ‘papayaWhip’, ‘cornflowerBlue’, ‘mediumBlue’, ‘chartreuse’, ‘lime’, ‘gainsboro’, ‘lightSeaGreen’, ‘darkOliveGreen’, ‘olive’, ‘paleVioletRed’, ‘darkGray’, ‘dkMagenta’, ‘plum’, ‘mediumPurple’, ‘mistyRose’, ‘darkCyan’, ‘royalBlue’, ‘turquoise’, ‘ghostWhite’, ‘pink’, ‘deepPink’, ‘greenYellow’, ‘medPurple’, ‘darkGrey’, ‘ltGray’, ‘lemonChiffon’, ‘seaGreen’, ‘coral’, ‘grey’, ‘thistle’, ‘crimson’, ‘dkGray’, ‘medSpringGreen’, ‘purple’, ‘forestGreen’, ‘blue’, ‘darkGoldenrod’, ‘darkGreen’, ‘dkSlateBlue’, ‘darkSlateGrey’, ‘dkTurquoise’, ‘lightSteelBlue’, ‘sandyBrown’, ‘teal’, ‘maroon’, ‘brown’, ‘burlyWood’, ‘mediumVioletRed’, ‘orange’, ‘dkRed’, ‘lightSkyBlue’, ‘darkViolet’, ‘paleGoldenrod’, ‘dkSlateGray’, ‘dkCyan’, ‘ltYellow’, ‘darkSlateGray’, ‘dkViolet’, ‘ltCoral’, ‘lightGrey’, ‘moccasin’, ‘yellowGreen’, ‘ltSlateGrey’, ‘floralWhite’, ‘lightGray’, ‘ltSalmon’, ‘wheat’, ‘salmon’, ‘dimGrey’, ‘ltBlue’, ‘dkGreen’, ‘honeydew’, ‘orangeRed’, ‘medAquamarine’, ‘navy’, ‘orchid’, ‘aliceBlue’, ‘dkOrchid’, ‘yellow’, ‘cornsilk’, ‘lightYellow’, ‘sienna’, ‘white’, ‘ltGrey’, ‘firebrick’, ‘dkOrange’, ‘blueViolet’, ‘powderBlue’, ‘slateGrey’, ‘violet’, ‘ltGoldenrodYellow’, ‘springGreen’, ‘beige’, ‘gray’, ‘saddleBrown’, ‘lightSlateGray’, ‘oliveDrab’, ‘darkSlateBlue’, ‘ltGreen’, ‘antiqueWhite’, ‘ivory’, ‘khaki’, ‘indigo’, ‘black’, ‘lawnGreen’, ‘darkKhaki’, ‘medSeaGreen’, ‘slateBlue’, ‘chocolate’, ‘mediumTurquoise’, ‘mediumSpringGreen’, ‘dkSeaGreen’, ‘tan’, ‘darkSalmon’, ‘navajoWhite’, ‘mediumSeaGreen’, ‘gold’, ‘aqua’, ‘dkGoldenrod’, ‘darkRed’, ‘medVioletRed’, ‘ltSlateGray’, ‘dkBlue’, ‘ltCyan’, ‘tomato’, ‘dimGray’, ‘limeGreen’, ‘lightCoral’, ‘oldLace’, ‘mediumAquamarine’, ‘darkMagenta’, ‘dkSlateGrey’, ‘medTurquoise’, ‘linen’, ‘snow’, ‘aquamarine’, ‘ltSteelBlue’, ‘paleGreen’, ‘medOrchid’, ‘dodgerBlue’, ‘seaShell’, ‘silver’, ‘steelBlue’, ‘mintCream’, ‘darkOrchid’}

  `schemeClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SchemeColor’>

  `scrgbClr`

    Values must be of type <class ‘openpyxl.drawing.colors.RGBPercent’>

  `srgbClr`

    Values must be of type <class ‘str’>

  `sysClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SystemColor’>

class `openpyxl.drawing.effect.``ReflectionEffect`(blurRad=None, stA=None, stPos=None, endA=None, endPos=None, dist=None, dir=None, fadeDir=None, sx=None, sy=None, kx=None, ky=None, algn=None, rotWithShape=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `algn`

    Value must be one of {‘ctr’, ‘t’, ‘r’, ‘bl’, ‘br’, ‘tl’, ‘b’, ‘tr’, ‘l’}

  `blurRad`

    Values must be of type <class ‘float’>

  `dir`

    Values must be of type <class ‘int’>

  `dist`

    Values must be of type <class ‘float’>

  `endA`

    Values must be of type <class ‘int’>

  `endPos`

    Values must be of type <class ‘int’>

  `fadeDir`

    Values must be of type <class ‘int’>

  `kx`

    Values must be of type <class ‘int’>

  `ky`

    Values must be of type <class ‘int’>

  `rotWithShape`

    Values must be of type <class ‘bool’>

  `stA`

    Values must be of type <class ‘int’>

  `stPos`

    Values must be of type <class ‘int’>

  `sx`

    Values must be of type <class ‘int’>

  `sy`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.effect.``SoftEdgesEffect`(rad=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `rad`

    Values must be of type <class ‘float’>

class `openpyxl.drawing.effect.``TintEffect`(hue=0, amt=0)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `amt`

    Values must be of type <class ‘int’>

  `hue`

    Values must be of type <class ‘int’>

  `tagname` = 'tint'

openpyxl.drawing.fill module

class `openpyxl.drawing.fill.``Blip`(cstate=None, embed=None, link=None, noGrp=None, noSelect=None, noRot=None, noChangeAspect=None, noMove=None, noResize=None, noEditPoints=None, noAdjustHandles=None, noChangeArrowheads=None, noChangeShapeType=None, extLst=None, alphaBiLevel=None, alphaCeiling=None, alphaFloor=None, alphaInv=None, alphaMod=None, alphaModFix=None, alphaRepl=None, biLevel=None, blur=None, clrChange=None, clrRepl=None, duotone=None, fillOverlay=None, grayscl=None, hsl=None, lum=None, tint=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alphaBiLevel`

    Values must be of type <class ‘openpyxl.drawing.effect.AlphaBiLevelEffect’>

  `alphaCeiling`

    Values must be of type <class ‘openpyxl.drawing.effect.AlphaCeilingEffect’>

  `alphaFloor`

    Values must be of type <class ‘openpyxl.drawing.effect.AlphaFloorEffect’>

  `alphaInv`

    Values must be of type <class ‘openpyxl.drawing.effect.AlphaInverseEffect’>

  `alphaMod`

    Values must be of type <class ‘openpyxl.drawing.effect.AlphaModulateEffect’>

  `alphaModFix`

    Values must be of type <class ‘openpyxl.drawing.effect.AlphaModulateFixedEffect’>

  `alphaRepl`

    Values must be of type <class ‘openpyxl.drawing.effect.AlphaReplaceEffect’>

  `biLevel`

    Values must be of type <class ‘openpyxl.drawing.effect.BiLevelEffect’>

  `blur`

    Values must be of type <class ‘openpyxl.drawing.effect.BlurEffect’>

  `clrChange`

    Values must be of type <class ‘openpyxl.drawing.effect.ColorChangeEffect’>

  `clrRepl`

    Values must be of type <class ‘openpyxl.drawing.effect.ColorReplaceEffect’>

  `cstate`

    Value must be one of {‘email’, ‘hqprint’, ‘screen’, ‘print’}

  `duotone`

    Values must be of type <class ‘openpyxl.drawing.effect.DuotoneEffect’>

  `embed`

    Values must be of type <class ‘str’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fillOverlay`

    Values must be of type <class ‘openpyxl.drawing.effect.FillOverlayEffect’>

  `grayscl`

    Values must be of type <class ‘openpyxl.drawing.effect.GrayscaleEffect’>

  `hsl`

    Values must be of type <class ‘openpyxl.drawing.effect.HSLEffect’>

  `link`

    Values must be of type <class ‘str’>

  `lum`

    Values must be of type <class ‘openpyxl.drawing.effect.LuminanceEffect’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `noAdjustHandles`

    Values must be of type <class ‘bool’>

  `noChangeArrowheads`

    Values must be of type <class ‘bool’>

  `noChangeAspect`

    Values must be of type <class ‘bool’>

  `noChangeShapeType`

    Values must be of type <class ‘bool’>

  `noEditPoints`

    Values must be of type <class ‘bool’>

  `noGrp`

    Values must be of type <class ‘bool’>

  `noMove`

    Values must be of type <class ‘bool’>

  `noResize`

    Values must be of type <class ‘bool’>

  `noRot`

    Values must be of type <class ‘bool’>

  `noSelect`

    Values must be of type <class ‘bool’>

  `tagname` = 'blip'
  `tint`

    Values must be of type <class ‘openpyxl.drawing.effect.TintEffect’>

class `openpyxl.drawing.fill.``BlipFillProperties`(dpi=None, rotWithShape=None, blip=None, tile=None, stretch=<openpyxl.drawing.fill.StretchInfoProperties object> Parameters: fillRect=<openpyxl.drawing.fill.RelativeRect object> Parameters: l=None, t=None, r=None, b=None, srcRect=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `blip`

    Values must be of type <class ‘openpyxl.drawing.fill.Blip’>

  `dpi`

    Values must be of type <class ‘int’>

  `rotWithShape`

    Values must be of type <class ‘bool’>

  `srcRect`

    Values must be of type <class ‘openpyxl.drawing.fill.RelativeRect’>

  `stretch`

    Values must be of type <class ‘openpyxl.drawing.fill.StretchInfoProperties’>

  `tagname` = 'blipFill'
  `tile`

    Values must be of type <class ‘openpyxl.drawing.fill.TileInfoProperties’>

class `openpyxl.drawing.fill.``GradientFillProperties`(flip=None, rotWithShape=None, gsLst=(), lin=None, path=None, tileRect=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `flip`

    Value must be one of {‘y’, ‘xy’, ‘x’}

  `gsLst`

    Wrap a sequence in an containing object

  `lin`

    Values must be of type <class ‘openpyxl.drawing.fill.LinearShadeProperties’>

  `linear`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `path`

    Values must be of type <class ‘openpyxl.drawing.fill.PathShadeProperties’>

  `rotWithShape`

    Values must be of type <class ‘bool’>

  `stop_list`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'gradFill'
  `tileRect`

    Values must be of type <class ‘openpyxl.drawing.fill.RelativeRect’>

class `openpyxl.drawing.fill.``GradientStop`(pos=None, scrgbClr=None, srgbClr=None, hslClr=None, sysClr=None, schemeClr=None, prstClr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `RGB`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `RGBPercent`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `hslClr`

    Values must be of type <class ‘openpyxl.drawing.colors.HSLColor’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `pos`

    Values must be of type <class ‘float’>

  `prstClr`

    Value must be one of {‘lavender’, ‘goldenrod’, ‘lightCyan’, ‘mediumSlateBlue’, ‘lavenderBlush’, ‘dkOliveGreen’, ‘cadetBlue’, ‘cyan’, ‘lightSalmon’, ‘bisque’, ‘blanchedAlmond’, ‘deepSkyBlue’, ‘peru’, ‘darkSeaGreen’, ‘medBlue’, ‘darkOrange’, ‘darkBlue’, ‘ltSeaGreen’, ‘dkKhaki’, ‘indianRed’, ‘whiteSmoke’, ‘magenta’, ‘green’, ‘lightBlue’, ‘darkTurquoise’, ‘slateGray’, ‘azure’, ‘fuchsia’, ‘medSlateBlue’, ‘lightGoldenrodYellow’, ‘dkGrey’, ‘dkSalmon’, ‘midnightBlue’, ‘red’, ‘mediumOrchid’, ‘peachPuff’, ‘lightGreen’, ‘hotPink’, ‘paleTurquoise’, ‘skyBlue’, ‘ltPink’, ‘rosyBrown’, ‘lightSlateGrey’, ‘lightPink’, ‘ltSkyBlue’, ‘papayaWhip’, ‘cornflowerBlue’, ‘mediumBlue’, ‘chartreuse’, ‘lime’, ‘gainsboro’, ‘lightSeaGreen’, ‘darkOliveGreen’, ‘olive’, ‘paleVioletRed’, ‘darkGray’, ‘dkMagenta’, ‘plum’, ‘mediumPurple’, ‘mistyRose’, ‘darkCyan’, ‘royalBlue’, ‘turquoise’, ‘ghostWhite’, ‘pink’, ‘deepPink’, ‘greenYellow’, ‘medPurple’, ‘darkGrey’, ‘ltGray’, ‘lemonChiffon’, ‘seaGreen’, ‘coral’, ‘grey’, ‘thistle’, ‘crimson’, ‘dkGray’, ‘medSpringGreen’, ‘purple’, ‘forestGreen’, ‘blue’, ‘darkGoldenrod’, ‘darkGreen’, ‘dkSlateBlue’, ‘darkSlateGrey’, ‘dkTurquoise’, ‘lightSteelBlue’, ‘sandyBrown’, ‘teal’, ‘maroon’, ‘brown’, ‘burlyWood’, ‘mediumVioletRed’, ‘orange’, ‘dkRed’, ‘lightSkyBlue’, ‘darkViolet’, ‘paleGoldenrod’, ‘dkSlateGray’, ‘dkCyan’, ‘ltYellow’, ‘darkSlateGray’, ‘dkViolet’, ‘ltCoral’, ‘lightGrey’, ‘moccasin’, ‘yellowGreen’, ‘ltSlateGrey’, ‘floralWhite’, ‘lightGray’, ‘ltSalmon’, ‘wheat’, ‘salmon’, ‘dimGrey’, ‘ltBlue’, ‘dkGreen’, ‘honeydew’, ‘orangeRed’, ‘medAquamarine’, ‘navy’, ‘orchid’, ‘aliceBlue’, ‘dkOrchid’, ‘yellow’, ‘cornsilk’, ‘lightYellow’, ‘sienna’, ‘white’, ‘ltGrey’, ‘firebrick’, ‘dkOrange’, ‘blueViolet’, ‘powderBlue’, ‘slateGrey’, ‘violet’, ‘ltGoldenrodYellow’, ‘springGreen’, ‘beige’, ‘gray’, ‘saddleBrown’, ‘lightSlateGray’, ‘oliveDrab’, ‘darkSlateBlue’, ‘ltGreen’, ‘antiqueWhite’, ‘ivory’, ‘khaki’, ‘indigo’, ‘black’, ‘lawnGreen’, ‘darkKhaki’, ‘medSeaGreen’, ‘slateBlue’, ‘chocolate’, ‘mediumTurquoise’, ‘mediumSpringGreen’, ‘dkSeaGreen’, ‘tan’, ‘darkSalmon’, ‘navajoWhite’, ‘mediumSeaGreen’, ‘gold’, ‘aqua’, ‘dkGoldenrod’, ‘darkRed’, ‘medVioletRed’, ‘ltSlateGray’, ‘dkBlue’, ‘ltCyan’, ‘tomato’, ‘dimGray’, ‘limeGreen’, ‘lightCoral’, ‘oldLace’, ‘mediumAquamarine’, ‘darkMagenta’, ‘dkSlateGrey’, ‘medTurquoise’, ‘linen’, ‘snow’, ‘aquamarine’, ‘ltSteelBlue’, ‘paleGreen’, ‘medOrchid’, ‘dodgerBlue’, ‘seaShell’, ‘silver’, ‘steelBlue’, ‘mintCream’, ‘darkOrchid’}

  `schemeClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SchemeColor’>

  `scrgbClr`

    Values must be of type <class ‘openpyxl.drawing.colors.RGBPercent’>

  `srgbClr`

    Values must be of type <class ‘str’>

  `sysClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SystemColor’>

  `tagname` = 'gs'

class `openpyxl.drawing.fill.``LinearShadeProperties`(ang=None, scaled=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ang`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `scaled`

    Values must be of type <class ‘bool’>

  `tagname` = 'lin'

class `openpyxl.drawing.fill.``PathShadeProperties`(path=None, fillToRect=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fillToRect`

    Values must be of type <class ‘openpyxl.drawing.fill.RelativeRect’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `path`

    Value must be one of {‘rect’, ‘shape’, ‘circle’}

  `tagname` = 'path'

class `openpyxl.drawing.fill.``PatternFillProperties`(prst=None, fgClr=None, bgClr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `background`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `bgClr`

    Values must be of type <class ‘openpyxl.drawing.colors.ColorChoice’>

  `fgClr`

    Values must be of type <class ‘openpyxl.drawing.colors.ColorChoice’>

  `foreground`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `preset`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `prst`

    Value must be one of {‘pct75’, ‘trellis’, ‘diagBrick’, ‘pct25’, ‘pct40’, ‘ltVert’, ‘ltDnDiag’, ‘lgCheck’, ‘dkVert’, ‘pct20’, ‘narVert’, ‘narHorz’, ‘smConfetti’, ‘ltHorz’, ‘lgConfetti’, ‘zigZag’, ‘horz’, ‘smGrid’, ‘dashHorz’, ‘vert’, ‘dnDiag’, ‘pct50’, ‘wdUpDiag’, ‘pct10’, ‘dotGrid’, ‘dkHorz’, ‘upDiag’, ‘dashVert’, ‘dkDnDiag’, ‘pct60’, ‘pct90’, ‘pct80’, ‘horzBrick’, ‘divot’, ‘solidDmnd’, ‘dotDmnd’, ‘pct70’, ‘dkUpDiag’, ‘plaid’, ‘weave’, ‘openDmnd’, ‘lgGrid’, ‘dashUpDiag’, ‘diagCross’, ‘ltUpDiag’, ‘dashDnDiag’, ‘pct5’, ‘smCheck’, ‘sphere’, ‘wdDnDiag’, ‘shingle’, ‘pct30’, ‘cross’, ‘wave’}

  `tagname` = 'pattFill'

class `openpyxl.drawing.fill.``RelativeRect`(l=None, t=None, r=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Values must be of type <class ‘float’>

  `bottom`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `l`

    Values must be of type <class ‘float’>

  `left`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `r`

    Values must be of type <class ‘float’>

  `right`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `t`

    Values must be of type <class ‘float’>

  `tagname` = 'rect'
  `top`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.drawing.fill.``SolidColorFillProperties`(scrgbClr=None, srgbClr=None, hslClr=None, sysClr=None, schemeClr=None, prstClr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `RGB`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `RGBPercent`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `hslClr`

    Values must be of type <class ‘openpyxl.drawing.colors.HSLColor’>

  `prstClr`

    Value must be one of {‘lavender’, ‘goldenrod’, ‘lightCyan’, ‘mediumSlateBlue’, ‘lavenderBlush’, ‘dkOliveGreen’, ‘cadetBlue’, ‘cyan’, ‘lightSalmon’, ‘bisque’, ‘blanchedAlmond’, ‘deepSkyBlue’, ‘peru’, ‘darkSeaGreen’, ‘medBlue’, ‘darkOrange’, ‘darkBlue’, ‘ltSeaGreen’, ‘dkKhaki’, ‘indianRed’, ‘whiteSmoke’, ‘magenta’, ‘green’, ‘lightBlue’, ‘darkTurquoise’, ‘slateGray’, ‘azure’, ‘fuchsia’, ‘medSlateBlue’, ‘lightGoldenrodYellow’, ‘dkGrey’, ‘dkSalmon’, ‘midnightBlue’, ‘red’, ‘mediumOrchid’, ‘peachPuff’, ‘lightGreen’, ‘hotPink’, ‘paleTurquoise’, ‘skyBlue’, ‘ltPink’, ‘rosyBrown’, ‘lightSlateGrey’, ‘lightPink’, ‘ltSkyBlue’, ‘papayaWhip’, ‘cornflowerBlue’, ‘mediumBlue’, ‘chartreuse’, ‘lime’, ‘gainsboro’, ‘lightSeaGreen’, ‘darkOliveGreen’, ‘olive’, ‘paleVioletRed’, ‘darkGray’, ‘dkMagenta’, ‘plum’, ‘mediumPurple’, ‘mistyRose’, ‘darkCyan’, ‘royalBlue’, ‘turquoise’, ‘ghostWhite’, ‘pink’, ‘deepPink’, ‘greenYellow’, ‘medPurple’, ‘darkGrey’, ‘ltGray’, ‘lemonChiffon’, ‘seaGreen’, ‘coral’, ‘grey’, ‘thistle’, ‘crimson’, ‘dkGray’, ‘medSpringGreen’, ‘purple’, ‘forestGreen’, ‘blue’, ‘darkGoldenrod’, ‘darkGreen’, ‘dkSlateBlue’, ‘darkSlateGrey’, ‘dkTurquoise’, ‘lightSteelBlue’, ‘sandyBrown’, ‘teal’, ‘maroon’, ‘brown’, ‘burlyWood’, ‘mediumVioletRed’, ‘orange’, ‘dkRed’, ‘lightSkyBlue’, ‘darkViolet’, ‘paleGoldenrod’, ‘dkSlateGray’, ‘dkCyan’, ‘ltYellow’, ‘darkSlateGray’, ‘dkViolet’, ‘ltCoral’, ‘lightGrey’, ‘moccasin’, ‘yellowGreen’, ‘ltSlateGrey’, ‘floralWhite’, ‘lightGray’, ‘ltSalmon’, ‘wheat’, ‘salmon’, ‘dimGrey’, ‘ltBlue’, ‘dkGreen’, ‘honeydew’, ‘orangeRed’, ‘medAquamarine’, ‘navy’, ‘orchid’, ‘aliceBlue’, ‘dkOrchid’, ‘yellow’, ‘cornsilk’, ‘lightYellow’, ‘sienna’, ‘white’, ‘ltGrey’, ‘firebrick’, ‘dkOrange’, ‘blueViolet’, ‘powderBlue’, ‘slateGrey’, ‘violet’, ‘ltGoldenrodYellow’, ‘springGreen’, ‘beige’, ‘gray’, ‘saddleBrown’, ‘lightSlateGray’, ‘oliveDrab’, ‘darkSlateBlue’, ‘ltGreen’, ‘antiqueWhite’, ‘ivory’, ‘khaki’, ‘indigo’, ‘black’, ‘lawnGreen’, ‘darkKhaki’, ‘medSeaGreen’, ‘slateBlue’, ‘chocolate’, ‘mediumTurquoise’, ‘mediumSpringGreen’, ‘dkSeaGreen’, ‘tan’, ‘darkSalmon’, ‘navajoWhite’, ‘mediumSeaGreen’, ‘gold’, ‘aqua’, ‘dkGoldenrod’, ‘darkRed’, ‘medVioletRed’, ‘ltSlateGray’, ‘dkBlue’, ‘ltCyan’, ‘tomato’, ‘dimGray’, ‘limeGreen’, ‘lightCoral’, ‘oldLace’, ‘mediumAquamarine’, ‘darkMagenta’, ‘dkSlateGrey’, ‘medTurquoise’, ‘linen’, ‘snow’, ‘aquamarine’, ‘ltSteelBlue’, ‘paleGreen’, ‘medOrchid’, ‘dodgerBlue’, ‘seaShell’, ‘silver’, ‘steelBlue’, ‘mintCream’, ‘darkOrchid’}

  `schemeClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SchemeColor’>

  `scrgbClr`

    Values must be of type <class ‘openpyxl.drawing.colors.RGBPercent’>

  `srgbClr`

    Values must be of type <class ‘str’>

  `sysClr`

    Values must be of type <class ‘openpyxl.drawing.colors.SystemColor’>

  `tagname` = 'solidFill'

class `openpyxl.drawing.fill.``StretchInfoProperties`(fillRect=<openpyxl.drawing.fill.RelativeRect object> Parameters: l=None, t=None, r=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fillRect`

    Values must be of type <class ‘openpyxl.drawing.fill.RelativeRect’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `tagname` = 'stretch'

class `openpyxl.drawing.fill.``TileInfoProperties`(tx=None, ty=None, sx=None, sy=None, flip=None, algn=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `algn`

    Value must be one of {‘ctr’, ‘t’, ‘r’, ‘bl’, ‘br’, ‘tl’, ‘b’, ‘tr’, ‘l’}

  `flip`

    Value must be one of {‘y’, ‘xy’, ‘x’}

  `sx`

    Values must be of type <class ‘int’>

  `sy`

    Values must be of type <class ‘int’>

  `tx`

    Values must be of type <class ‘int’>

  `ty`

    Values must be of type <class ‘int’>

openpyxl.drawing.geometry module

class `openpyxl.drawing.geometry.``AdjPoint2D`(x=None, y=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `x`

    Values must be of type <class ‘int’>

  `y`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.geometry.``AdjustHandleList`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.drawing.geometry.``Backdrop`(anchor=None, norm=None, up=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `anchor`

    Values must be of type <class ‘openpyxl.drawing.geometry.Point3D’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `norm`

    Values must be of type <class ‘openpyxl.drawing.geometry.Vector3D’>

  `up`

    Values must be of type <class ‘openpyxl.drawing.geometry.Vector3D’>

class `openpyxl.drawing.geometry.``Bevel`(w=None, h=None, prst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `h`

    Values must be of type <class ‘int’>

  `prst`

    Value must be one of {‘riblet’, ‘circle’, ‘angle’, ‘divot’, ‘slope’, ‘hardEdge’, ‘convex’, ‘coolSlant’, ‘softRound’, ‘cross’, ‘artDeco’, ‘relaxedInset’}

  `tagname` = 'bevel'
  `w`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.geometry.``Camera`(prst=None, fov=None, zoom=None, rot=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fov`

    Values must be of type <class ‘int’>

  `prst`

    Value must be one of {‘isometricOffAxis4Right’, ‘perspectiveContrastingRightFacing’, ‘isometricOffAxis1Right’, ‘perspectiveRelaxed’, ‘legacyPerspectiveFront’, ‘legacyPerspectiveBottom’, ‘isometricTopUp’, ‘perspectiveHeroicLeftFacing’, ‘legacyObliqueBottom’, ‘legacyObliqueTopLeft’, ‘isometricBottomDown’, ‘isometricOffAxis1Left’, ‘obliqueLeft’, ‘perspectiveHeroicExtremeRightFacing’, ‘isometricOffAxis3Bottom’, ‘legacyObliqueTopRight’, ‘isometricBottomUp’, ‘legacyPerspectiveBottomRight’, ‘isometricOffAxis2Left’, ‘legacyPerspectiveTopLeft’, ‘isometricOffAxis2Right’, ‘isometricOffAxis4Left’, ‘isometricRightUp’, ‘perspectiveAboveLeftFacing’, ‘perspectiveLeft’, ‘isometricOffAxis3Left’, ‘isometricOffAxis1Top’, ‘perspectiveRight’, ‘legacyPerspectiveLeft’, ‘perspectiveBelow’, ‘obliqueBottomRight’, ‘legacyObliqueBottomRight’, ‘legacyObliqueBottomLeft’, ‘legacyObliqueTop’, ‘legacyPerspectiveTop’, ‘isometricOffAxis3Right’, ‘obliqueTopLeft’, ‘isometricOffAxis4Bottom’, ‘legacyPerspectiveBottomLeft’, ‘legacyObliqueRight’, ‘perspectiveHeroicRightFacing’, ‘legacyObliqueFront’, ‘legacyPerspectiveRight’, ‘obliqueBottomLeft’, ‘legacyObliqueLeft’, ‘isometricRightDown’, ‘perspectiveHeroicExtremeLeftFacing’, ‘legacyPerspectiveTopRight’, ‘isometricTopDown’, ‘isometricOffAxis2Top’, ‘isometricLeftUp’, ‘isometricLeftDown’, ‘perspectiveAbove’, ‘perspectiveContrastingLeftFacing’, ‘obliqueTopRight’, ‘obliqueBottom’, ‘perspectiveAboveRightFacing’, ‘perspectiveFront’, ‘obliqueRight’, ‘orthographicFront’, ‘perspectiveRelaxedModerately’, ‘obliqueTop’}

  `rot`

    Values must be of type <class ‘openpyxl.drawing.geometry.SphereCoords’>

  `tagname` = 'camera'
  `zoom`

    Values must be of type <class ‘openpyxl.descriptors.excel.Percentage’>

class `openpyxl.drawing.geometry.``ConnectionSite`(ang=None, pos=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ang`

    Values must be of type <class ‘float’>

  `pos`

    Values must be of type <class ‘openpyxl.drawing.geometry.AdjPoint2D’>

class `openpyxl.drawing.geometry.``ConnectionSiteList`(cxn=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cxn`

    Values must be of type <class ‘openpyxl.drawing.geometry.ConnectionSite’>

class `openpyxl.drawing.geometry.``CustomGeometry2D`(avLst=None, gdLst=None, ahLst=None, cxnLst=None, rect=None, pathLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ahLst`

    Values must be of type <class ‘openpyxl.drawing.geometry.AdjustHandleList’>

  `avLst`

    Values must be of type <class ‘openpyxl.drawing.geometry.GeomGuideList’>

  `cxnLst`

    Values must be of type <class ‘openpyxl.drawing.geometry.ConnectionSiteList’>

  `gdLst`

    Values must be of type <class ‘openpyxl.drawing.geometry.GeomGuideList’>

  `pathLst`

    Values must be of type <class ‘openpyxl.drawing.geometry.Path2DList’>

class `openpyxl.drawing.geometry.``FontReference`(idx=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `idx`

    Value must be one of {‘minor’, ‘major’}

class `openpyxl.drawing.geometry.``GeomGuide`(name=None, fmla=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fmla`

    Values must be of type <class ‘str’>

  `name`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.geometry.``GeomGuideList`(gd=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `gd`

    Values must be of type <class ‘openpyxl.drawing.geometry.GeomGuide’>

class `openpyxl.drawing.geometry.``GeomRect`(l=None, t=None, r=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Values must be of type <class ‘int’>

  `l`

    Values must be of type <class ‘int’>

  `r`

    Values must be of type <class ‘int’>

  `t`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.geometry.``GroupTransform2D`(rot=0, flipH=None, flipV=None, off=None, ext=None, chOff=None, chExt=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `chExt`

    Values must be of type <class ‘openpyxl.drawing.geometry.PositiveSize2D’>

  `chOff`

    Values must be of type <class ‘openpyxl.drawing.geometry.Point2D’>

  `ext`

    Values must be of type <class ‘openpyxl.drawing.geometry.PositiveSize2D’>

  `flipH`

    Values must be of type <class ‘bool’>

  `flipV`

    Values must be of type <class ‘bool’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `off`

    Values must be of type <class ‘openpyxl.drawing.geometry.Point2D’>

  `rot`

    Values must be of type <class ‘int’>

  `tagname` = 'xfrm'

class `openpyxl.drawing.geometry.``LightRig`(rig=None, dir=None, rot=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `dir`

    Value must be one of {‘t’, ‘r’, ‘bl’, ‘br’, ‘tl’, ‘b’, ‘tr’, ‘l’}

  `rig`

    Value must be one of {‘brightRoom’, ‘legacyNormal2’, ‘legacyFlat2’, ‘legacyNormal4’, ‘legacyHarsh2’, ‘chilly’, ‘flood’, ‘threePt’, ‘legacyFlat4’, ‘harsh’, ‘legacyHarsh3’, ‘legacyHarsh1’, ‘freezing’, ‘glow’, ‘sunset’, ‘morning’, ‘legacyHarsh4’, ‘legacyNormal1’, ‘contrasting’, ‘sunrise’, ‘legacyFlat1’, ‘balanced’, ‘twoPt’, ‘legacyNormal3’, ‘flat’, ‘legacyFlat3’, ‘soft’}

  `rot`

    Values must be of type <class ‘openpyxl.drawing.geometry.SphereCoords’>

  `tagname` = 'lightRig'

class `openpyxl.drawing.geometry.``Path2D`(w=None, h=None, fill=None, stroke=None, extrusionOk=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extrusionOk`

    Values must be of type <class ‘bool’>

  `fill`

    Value must be one of {‘lightenLess’, ‘darken’, ‘darkenLess’, ‘lighten’, ‘norm’}

  `h`

    Values must be of type <class ‘float’>

  `stroke`

    Values must be of type <class ‘bool’>

  `w`

    Values must be of type <class ‘float’>

class `openpyxl.drawing.geometry.``Path2DList`(path=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `path`

    Values must be of type <class ‘openpyxl.drawing.geometry.Path2D’>

class `openpyxl.drawing.geometry.``Point2D`(x=None, y=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `tagname` = 'off'
  `x`

    Values must be of type <class ‘int’>

  `y`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.geometry.``Point3D`(x=None, y=None, z=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tagname` = 'anchor'
  `x`

    Values must be of type <class ‘int’>

  `y`

    Values must be of type <class ‘int’>

  `z`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.geometry.``PositiveSize2D`(cx=None, cy=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cx`

    Values must be of type <class ‘int’>

  `cy`

    Values must be of type <class ‘int’>

  `height`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'

    Dimensions in EMUs

  `tagname` = 'ext'
  `width`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.drawing.geometry.``PresetGeometry2D`(prst=None, avLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `avLst`

    Values must be of type <class ‘openpyxl.drawing.geometry.GeomGuideList’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `prst`

    Value must be one of {‘donut’, ‘bentConnector5’, ‘bentArrow’, ‘straightConnector1’, ‘ellipseRibbon2’, ‘horizontalScroll’, ‘wedgeRectCallout’, ‘flowChartMagneticTape’, ‘star6’, ‘actionButtonDocument’, ‘flowChartPreparation’, ‘flowChartOnlineStorage’, ‘octagon’, ‘leftUpArrow’, ‘swooshArrow’, ‘flowChartCollate’, ‘curvedConnector2’, ‘star10’, ‘flowChartManualInput’, ‘star16’, ‘actionButtonBlank’, ‘actionButtonForwardNext’, ‘cornerTabs’, ‘leftBracket’, ‘upDownArrowCallout’, ‘leftArrowCallout’, ‘accentCallout1’, ‘smileyFace’, ‘corner’, ‘flowChartMagneticDisk’, ‘flowChartDecision’, ‘mathPlus’, ‘roundRect’, ‘flowChartExtract’, ‘flowChartManualOperation’, ‘arc’, ‘heptagon’, ‘curvedConnector5’, ‘chevron’, ‘triangle’, ‘flowChartOr’, ‘pentagon’, ‘wedgeEllipseCallout’, ‘upArrowCallout’, ‘squareTabs’, ‘rect’, ‘leftCircularArrow’, ‘actionButtonHome’, ‘mathNotEqual’, ‘borderCallout3’, ‘quadArrow’, ‘trapezoid’, ‘gear9’, ‘heart’, ‘actionButtonReturn’, ‘round2DiagRect’, ‘bentConnector3’, ‘flowChartOffpageConnector’, ‘star32’, ‘leftRightUpArrow’, ‘irregularSeal1’, ‘leftRightArrowCallout’, ‘flowChartMerge’, ‘ellipse’, ‘wedgeRoundRectCallout’, ‘chord’, ‘mathEqual’, ‘bentConnector2’, ‘star24’, ‘actionButtonEnd’, ‘flowChartSort’, ‘curvedConnector3’, ‘curvedConnector4’, ‘flowChartPunchedCard’, ‘flowChartInternalStorage’, ‘hexagon’, ‘mathMultiply’, ‘dodecagon’, ‘moon’, ‘snip2SameRect’, ‘accentBorderCallout3’, ‘flowChartDelay’, ‘stripedRightArrow’, ‘borderCallout2’, ‘flowChartProcess’, ‘downArrowCallout’, ‘mathMinus’, ‘gear6’, ‘ribbon2’, ‘halfFrame’, ‘flowChartDocument’, ‘line’, ‘curvedLeftArrow’, ‘decagon’, ‘actionButtonHelp’, ‘flowChartConnector’, ‘mathDivide’, ‘leftArrow’, ‘accentBorderCallout2’, ‘round1Rect’, ‘plaqueTabs’, ‘leftBrace’, ‘uturnArrow’, ‘notchedRightArrow’, ‘nonIsoscelesTrapezoid’, ‘chartX’, ‘leftRightRibbon’, ‘cloudCallout’, ‘flowChartAlternateProcess’, ‘pieWedge’, ‘irregularSeal2’, ‘flowChartPunchedTape’, ‘snip2DiagRect’, ‘callout1’, ‘pie’, ‘curvedDownArrow’, ‘lightningBolt’, ‘star5’, ‘cube’, ‘snip1Rect’, ‘flowChartMagneticDrum’, ‘star8’, ‘bentUpArrow’, ‘actionButtonInformation’, ‘flowChartSummingJunction’, ‘parallelogram’, ‘frame’, ‘chartStar’, ‘verticalScroll’, ‘accentBorderCallout1’, ‘doubleWave’, ‘rtTriangle’, ‘star7’, ‘blockArc’, ‘upArrow’, ‘funnel’, ‘accentCallout3’, ‘diagStripe’, ‘star12’, ‘noSmoking’, ‘downArrow’, ‘star4’, ‘snipRoundRect’, ‘cloud’, ‘flowChartPredefinedProcess’, ‘lineInv’, ‘rightArrowCallout’, ‘chartPlus’, ‘teardrop’, ‘rightBracket’, ‘bevel’, ‘circularArrow’, ‘flowChartMultidocument’, ‘upDownArrow’, ‘quadArrowCallout’, ‘bracePair’, ‘rightBrace’, ‘actionButtonSound’, ‘bentConnector4’, ‘callout3’, ‘flowChartOfflineStorage’, ‘foldedCorner’, ‘ellipseRibbon’, ‘rightArrow’, ‘actionButtonMovie’, ‘sun’, ‘plaque’, ‘actionButtonBeginning’, ‘borderCallout1’, ‘leftRightCircularArrow’, ‘can’, ‘plus’, ‘flowChartInputOutput’, ‘flowChartDisplay’, ‘curvedRightArrow’, ‘curvedUpArrow’, ‘callout2’, ‘accentCallout2’, ‘homePlate’, ‘ribbon’, ‘round2SameRect’, ‘leftRightArrow’, ‘wave’, ‘bracketPair’, ‘diamond’, ‘actionButtonBackPrevious’, ‘flowChartTerminator’}

class `openpyxl.drawing.geometry.``Scene3D`(camera=None, lightRig=None, backdrop=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `backdrop`

    Values must be of type <class ‘openpyxl.drawing.geometry.Backdrop’>

  `camera`

    Values must be of type <class ‘openpyxl.drawing.geometry.Camera’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `lightRig`

    Values must be of type <class ‘openpyxl.drawing.geometry.LightRig’>

class `openpyxl.drawing.geometry.``Shape3D`(z=None, extrusionH=None, contourW=None, prstMaterial=None, bevelT=None, bevelB=None, extrusionClr=None, contourClr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `bevelB`

    Values must be of type <class ‘openpyxl.drawing.geometry.Bevel’>

  `bevelT`

    Values must be of type <class ‘openpyxl.drawing.geometry.Bevel’>

  `contourClr`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `contourW`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `extrusionClr`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `extrusionH`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `prstMaterial`

    Value must be one of {‘metal’, ‘powder’, ‘softmetal’, ‘clear’, ‘legacyPlastic’, ‘dkEdge’, ‘plastic’, ‘flat’, ‘warmMatte’, ‘matte’, ‘softEdge’, ‘translucentPowder’, ‘legacyMetal’, ‘legacyWireframe’, ‘legacyMatte’}

  `z`

    Values must be of type <class ‘openpyxl.descriptors.base.Integer’>

class `openpyxl.drawing.geometry.``ShapeStyle`(lnRef=None, fillRef=None, effectRef=None, fontRef=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `effectRef`

    Values must be of type <class ‘openpyxl.drawing.geometry.StyleMatrixReference’>

  `fillRef`

    Values must be of type <class ‘openpyxl.drawing.geometry.StyleMatrixReference’>

  `fontRef`

    Values must be of type <class ‘openpyxl.drawing.geometry.FontReference’>

  `lnRef`

    Values must be of type <class ‘openpyxl.drawing.geometry.StyleMatrixReference’>

class `openpyxl.drawing.geometry.``SphereCoords`(lat=None, lon=None, rev=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `lat`

    Values must be of type <class ‘int’>

  `lon`

    Values must be of type <class ‘int’>

  `rev`

    Values must be of type <class ‘int’>

  `tagname` = 'sphereCoords'

class `openpyxl.drawing.geometry.``StyleMatrixReference`(idx=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `idx`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.geometry.``Transform2D`(rot=None, flipH=None, flipV=None, off=None, ext=None, chOff=None, chExt=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `chExt`

    Values must be of type <class ‘openpyxl.drawing.geometry.PositiveSize2D’>

  `chOff`

    Values must be of type <class ‘openpyxl.drawing.geometry.Point2D’>

  `ext`

    Values must be of type <class ‘openpyxl.drawing.geometry.PositiveSize2D’>

  `flipH`

    Values must be of type <class ‘bool’>

  `flipV`

    Values must be of type <class ‘bool’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `off`

    Values must be of type <class ‘openpyxl.drawing.geometry.Point2D’>

  `rot`

    Values must be of type <class ‘int’>

  `tagname` = 'xfrm'

class `openpyxl.drawing.geometry.``Vector3D`(dx=None, dy=None, dz=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `dx`

    Values must be of type <class ‘int’>

  `dy`

    Values must be of type <class ‘int’>

  `dz`

    Values must be of type <class ‘int’>

  `tagname` = 'vector'

openpyxl.drawing.graphic module

class `openpyxl.drawing.graphic.``GraphicData`(uri='http://schemas.openxmlformats.org/drawingml/2006/chart', chart=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `chart`

    Values must be of type <class ‘openpyxl.drawing.relation.ChartRelation’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `tagname` = 'graphicData'
  `uri`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.graphic.``GraphicFrame`(nvGraphicFramePr=None, xfrm=None, graphic=None, macro=None, fPublished=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fPublished`

    Values must be of type <class ‘bool’>

  `graphic`

    Values must be of type <class ‘openpyxl.drawing.graphic.GraphicObject’>

  `macro`

    Values must be of type <class ‘str’>

  `nvGraphicFramePr`

    Values must be of type <class ‘openpyxl.drawing.graphic.NonVisualGraphicFrame’>

  `tagname` = 'graphicFrame'
  `xfrm`

    Values must be of type <class ‘openpyxl.drawing.xdr.XDRTransform2D’>

class `openpyxl.drawing.graphic.``GraphicFrameLocking`(noGrp=None, noDrilldown=None, noSelect=None, noChangeAspect=None, noMove=None, noResize=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `noChangeAspect`

    Values must be of type <class ‘bool’>

  `noDrilldown`

    Values must be of type <class ‘bool’>

  `noGrp`

    Values must be of type <class ‘bool’>

  `noMove`

    Values must be of type <class ‘bool’>

  `noResize`

    Values must be of type <class ‘bool’>

  `noSelect`

    Values must be of type <class ‘bool’>

class `openpyxl.drawing.graphic.``GraphicObject`(graphicData=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `graphicData`

    Values must be of type <class ‘openpyxl.drawing.graphic.GraphicData’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `tagname` = 'graphic'

class `openpyxl.drawing.graphic.``GroupShape`(nvGrpSpPr=None, grpSpPr=None, pic=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `grpSpPr`

    Values must be of type <class ‘openpyxl.drawing.properties.GroupShapeProperties’>

  `nonVisualProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `nvGrpSpPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualGroupShape’>

  `pic`

    Values must be of type <class ‘openpyxl.drawing.picture.PictureFrame’>

  `visualProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.drawing.graphic.``NonVisualGraphicFrame`(cNvPr=None, cNvGraphicFramePr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cNvGraphicFramePr`

    Values must be of type <class ‘openpyxl.drawing.graphic.NonVisualGraphicFrameProperties’>

  `cNvPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualDrawingProps’>

  `tagname` = 'nvGraphicFramePr'

class `openpyxl.drawing.graphic.``NonVisualGraphicFrameProperties`(graphicFrameLocks=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `graphicFrameLocks`

    Values must be of type <class ‘openpyxl.drawing.graphic.GraphicFrameLocking’>

  `tagname` = 'cNvGraphicFramePr'

openpyxl.drawing.image module

class `openpyxl.drawing.image.``Image`(img)

  Bases: `object`

  Image in a spreadsheet

  `anchor` = 'A1'
  `path`

openpyxl.drawing.line module

class `openpyxl.drawing.line.``DashStop`(d=0, sp=0)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `d`

    Values must be of type <class ‘int’>

  `length`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `sp`

    Values must be of type <class ‘int’>

  `space`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'ds'

class `openpyxl.drawing.line.``DashStopList`(ds=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ds`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.drawing.line.``LineEndProperties`(type=None, w=None, len=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `len`

    Value must be one of {‘med’, ‘sm’, ‘lg’}

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `tagname` = 'end'
  `type`

    Value must be one of {‘oval’, ‘stealth’, ‘arrow’, ‘triangle’, ‘diamond’, ‘none’}

  `w`

    Value must be one of {‘med’, ‘sm’, ‘lg’}

class `openpyxl.drawing.line.``LineProperties`(w=None, cap=None, cmpd=None, algn=None, noFill=None, solidFill=None, gradFill=None, pattFill=None, prstDash=None, custDash=None, round=None, bevel=None, miter=None, headEnd=None, tailEnd=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `algn`

    Value must be one of {‘ctr’, ‘in’}

  `bevel`

    Values must be of type <class ‘bool’>

  `cap`

    Value must be one of {‘rnd’, ‘flat’, ‘sq’}

  `cmpd`

    Value must be one of {‘dbl’, ‘thickThin’, ‘tri’, ‘sng’, ‘thinThick’}

  `custDash`

    Values must be of type <class ‘openpyxl.drawing.line.DashStop’>

  `dashStyle`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gradFill`

    Values must be of type <class ‘openpyxl.drawing.fill.GradientFillProperties’>

  `headEnd`

    Values must be of type <class ‘openpyxl.drawing.line.LineEndProperties’>

  `miter`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `noFill`

    Values must be of type <class ‘bool’>

  `pattFill`

    Values must be of type <class ‘openpyxl.drawing.fill.PatternFillProperties’>

  `prstDash`

    Value must be one of {‘lgDash’, ‘lgDashDotDot’, ‘dashDot’, ‘sysDot’, ‘sysDash’, ‘lgDashDot’, ‘dot’, ‘solid’, ‘sysDashDot’, ‘sysDashDotDot’, ‘dash’}

  `round`

    Values must be of type <class ‘bool’>

  `solidFill`

    Values must be of type <class ‘openpyxl.drawing.colors.ColorChoice’>

  `tagname` = 'ln'
  `tailEnd`

    Values must be of type <class ‘openpyxl.drawing.line.LineEndProperties’>

  `w`

    Values must be of type <class ‘float’>

  `width`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

openpyxl.drawing.picture module

class `openpyxl.drawing.picture.``NonVisualPictureProperties`(preferRelativeResize=None, picLocks=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `picLocks`

    Values must be of type <class ‘openpyxl.drawing.picture.PictureLocking’>

  `preferRelativeResize`

    Values must be of type <class ‘bool’>

  `tagname` = 'cNvPicPr'

class `openpyxl.drawing.picture.``PictureFrame`(macro=None, fPublished=None, nvPicPr=None, blipFill=None, spPr=None, style=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `blipFill`

    Values must be of type <class ‘openpyxl.drawing.fill.BlipFillProperties’>

  `fPublished`

    Values must be of type <class ‘bool’>

  `graphicalProperties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `macro`

    Values must be of type <class ‘str’>

  `nvPicPr`

    Values must be of type <class ‘openpyxl.drawing.picture.PictureNonVisual’>

  `spPr`

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  `style`

    Values must be of type <class ‘openpyxl.drawing.geometry.ShapeStyle’>

  `tagname` = 'pic'

class `openpyxl.drawing.picture.``PictureLocking`(noCrop=None, noGrp=None, noSelect=None, noRot=None, noChangeAspect=None, noMove=None, noResize=None, noEditPoints=None, noAdjustHandles=None, noChangeArrowheads=None, noChangeShapeType=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `noAdjustHandles`

    Values must be of type <class ‘bool’>

  `noChangeArrowheads`

    Values must be of type <class ‘bool’>

  `noChangeAspect`

    Values must be of type <class ‘bool’>

  `noChangeShapeType`

    Values must be of type <class ‘bool’>

  `noCrop`

    Values must be of type <class ‘bool’>

  `noEditPoints`

    Values must be of type <class ‘bool’>

  `noGrp`

    Values must be of type <class ‘bool’>

  `noMove`

    Values must be of type <class ‘bool’>

  `noResize`

    Values must be of type <class ‘bool’>

  `noRot`

    Values must be of type <class ‘bool’>

  `noSelect`

    Values must be of type <class ‘bool’>

  `tagname` = 'picLocks'

class `openpyxl.drawing.picture.``PictureNonVisual`(cNvPr=None, cNvPicPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cNvPicPr`

    Values must be of type <class ‘openpyxl.drawing.picture.NonVisualPictureProperties’>

  `cNvPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualDrawingProps’>

  `tagname` = 'nvPicPr'

openpyxl.drawing.properties module

class `openpyxl.drawing.properties.``GroupLocking`(noGrp=None, noUngrp=None, noSelect=None, noRot=None, noChangeAspect=None, noChangeArrowheads=None, noMove=None, noResize=None, noEditPoints=None, noAdjustHandles=None, noChangeShapeType=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `noAdjustHandles`

    Values must be of type <class ‘bool’>

  `noChangeArrowheads`

    Values must be of type <class ‘bool’>

  `noChangeAspect`

    Values must be of type <class ‘bool’>

  `noChangeShapeType`

    Values must be of type <class ‘bool’>

  `noEditPoints`

    Values must be of type <class ‘bool’>

  `noGrp`

    Values must be of type <class ‘bool’>

  `noMove`

    Values must be of type <class ‘bool’>

  `noResize`

    Values must be of type <class ‘bool’>

  `noRot`

    Values must be of type <class ‘bool’>

  `noSelect`

    Values must be of type <class ‘bool’>

  `noUngrp`

    Values must be of type <class ‘bool’>

  `tagname` = 'grpSpLocks'

class `openpyxl.drawing.properties.``GroupShapeProperties`(bwMode=None, xfrm=None, scene3d=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `bwMode`

    Value must be one of {‘black’, ‘white’, ‘gray’, ‘ltGray’, ‘clr’, ‘hidden’, ‘blackGray’, ‘auto’, ‘invGray’, ‘blackWhite’, ‘grayWhite’}

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `scene3d`

    Values must be of type <class ‘openpyxl.drawing.geometry.Scene3D’>

  `tagname` = 'grpSpPr'
  `xfrm`

    Values must be of type <class ‘openpyxl.drawing.geometry.GroupTransform2D’>

class `openpyxl.drawing.properties.``NonVisualDrawingProps`(id=None, name=None, descr=None, hidden=None, title=None, hlinkClick=None, hlinkHover=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `descr`

    Values must be of type <class ‘str’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `hidden`

    Values must be of type <class ‘bool’>

  `hlinkClick`

    Values must be of type <class ‘openpyxl.drawing.text.Hyperlink’>

  `hlinkHover`

    Values must be of type <class ‘openpyxl.drawing.text.Hyperlink’>

  `id`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'cNvPr'
  `title`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.properties.``NonVisualDrawingShapeProps`(spLocks=None, txBox=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `spLocks`

    Values must be of type <class ‘openpyxl.drawing.properties.GroupLocking’>

  `tagname` = 'cNvSpPr'
  `txBax`

    Values must be of type <class ‘bool’>

class `openpyxl.drawing.properties.``NonVisualGroupDrawingShapeProps`(grpSpLocks=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `grpSpLocks`

    Values must be of type <class ‘openpyxl.drawing.properties.GroupLocking’>

  `tagname` = 'cNvGrpSpPr'

class `openpyxl.drawing.properties.``NonVisualGroupShape`(cNvPr=None, cNvGrpSpPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cNvGrpSpPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualGroupDrawingShapeProps’>

  `cNvPr`

    Values must be of type <class ‘openpyxl.drawing.properties.NonVisualDrawingProps’>

  `tagname` = 'nvGrpSpPr'

openpyxl.drawing.relation module

class `openpyxl.drawing.relation.``ChartRelation`(id)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘str’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/chart'
  `tagname` = 'chart'

openpyxl.drawing.spreadsheet_drawing module

class `openpyxl.drawing.spreadsheet_drawing.``AbsoluteAnchor`(pos=None, ext=None, **kw)

  Bases: `openpyxl.drawing.spreadsheet_drawing._AnchorBase`

  `clientData`

    Values must be of type <class ‘openpyxl.drawing.spreadsheet_drawing.AnchorClientData’>

  `contentPart`

    Values must be of type <class ‘str’>

  `cxnSp`

    Values must be of type <class ‘openpyxl.drawing.connector.Shape’>

  `ext`

    Values must be of type <class ‘openpyxl.drawing.xdr.XDRPositiveSize2D’>

  `graphicFrame`

    Values must be of type <class ‘openpyxl.drawing.graphic.GraphicFrame’>

  `grpSp`

    Values must be of type <class ‘openpyxl.drawing.graphic.GroupShape’>

  `pic`

    Values must be of type <class ‘openpyxl.drawing.picture.PictureFrame’>

  `pos`

    Values must be of type <class ‘openpyxl.drawing.xdr.XDRPoint2D’>

  `sp`

    Values must be of type <class ‘openpyxl.drawing.connector.Shape’>

  `tagname` = 'absoluteAnchor'

class `openpyxl.drawing.spreadsheet_drawing.``AnchorClientData`(fLocksWithSheet=None, fPrintsWithSheet=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fLocksWithSheet`

    Values must be of type <class ‘bool’>

  `fPrintsWithSheet`

    Values must be of type <class ‘bool’>

class `openpyxl.drawing.spreadsheet_drawing.``AnchorMarker`(col=0, colOff=0, row=0, rowOff=0)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `col`

    Values must be of type <class ‘int’>

  `colOff`

    Values must be of type <class ‘int’>

  `row`

    Values must be of type <class ‘int’>

  `rowOff`

    Values must be of type <class ‘int’>

  `tagname` = 'marker'

class `openpyxl.drawing.spreadsheet_drawing.``OneCellAnchor`(_from=None, ext=None, **kw)

  Bases: `openpyxl.drawing.spreadsheet_drawing._AnchorBase`

  `clientData`

    Values must be of type <class ‘openpyxl.drawing.spreadsheet_drawing.AnchorClientData’>

  `contentPart`

    Values must be of type <class ‘str’>

  `cxnSp`

    Values must be of type <class ‘openpyxl.drawing.connector.Shape’>

  `ext`

    Values must be of type <class ‘openpyxl.drawing.xdr.XDRPositiveSize2D’>

  `graphicFrame`

    Values must be of type <class ‘openpyxl.drawing.graphic.GraphicFrame’>

  `grpSp`

    Values must be of type <class ‘openpyxl.drawing.graphic.GroupShape’>

  `pic`

    Values must be of type <class ‘openpyxl.drawing.picture.PictureFrame’>

  `sp`

    Values must be of type <class ‘openpyxl.drawing.connector.Shape’>

  `tagname` = 'oneCellAnchor'

class `openpyxl.drawing.spreadsheet_drawing.``SpreadsheetDrawing`(twoCellAnchor=(), oneCellAnchor=(), absoluteAnchor=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `PartName` = '/xl/drawings/drawing{0}.xml'
  `absoluteAnchor`

    A sequence (list or tuple) that may only contain objects of the declared type

  `mime_type` = 'application/vnd.openxmlformats-officedocument.drawing+xml'
  `oneCellAnchor`

    A sequence (list or tuple) that may only contain objects of the declared type

  `path`
  `tagname` = 'wsDr'
  `twoCellAnchor`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.drawing.spreadsheet_drawing.``TwoCellAnchor`(editAs=None, _from=None, to=None, **kw)

  Bases: `openpyxl.drawing.spreadsheet_drawing._AnchorBase`

  `clientData`

    Values must be of type <class ‘openpyxl.drawing.spreadsheet_drawing.AnchorClientData’>

  `contentPart`

    Values must be of type <class ‘str’>

  `cxnSp`

    Values must be of type <class ‘openpyxl.drawing.connector.Shape’>

  `editAs`

    Value must be one of {‘oneCell’, ‘twoCell’, ‘absolute’}

  `graphicFrame`

    Values must be of type <class ‘openpyxl.drawing.graphic.GraphicFrame’>

  `grpSp`

    Values must be of type <class ‘openpyxl.drawing.graphic.GroupShape’>

  `pic`

    Values must be of type <class ‘openpyxl.drawing.picture.PictureFrame’>

  `sp`

    Values must be of type <class ‘openpyxl.drawing.connector.Shape’>

  `tagname` = 'twoCellAnchor'
  `to`

    Values must be of type <class ‘openpyxl.drawing.spreadsheet_drawing.AnchorMarker’>

openpyxl.drawing.text module

class `openpyxl.drawing.text.``AutonumberBullet`(type=None, startAt=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `startAt`

    Values must be of type <class ‘int’>

  `type`

    Value must be one of {‘ea1ChsPlain’, ‘arabicDbPeriod’, ‘arabicParenBoth’, ‘hindiNumPeriod’, ‘romanLcPeriod’, ‘alphaLcPeriod’, ‘romanUcParenR’, ‘alphaLcParenBoth’, ‘thaiNumParenR’, ‘romanUcParenBoth’, ‘alphaUcPeriod’, ‘arabicPlain’, ‘circleNumWdWhitePlain’, ‘alphaUcParenBoth’, ‘thaiAlphaParenBoth’, ‘alphaUcParenR’, ‘arabic2Minus’, ‘ea1JpnChsDbPeriod’, ‘hindiAlpha1Period’, ‘circleNumWdBlackPlain’, ‘arabicDbPlain’, ‘arabicParenR’, ‘arabicPeriod’, ‘romanUcPeriod’, ‘arabic1Minus’, ‘ea1ChtPlain’, ‘thaiAlphaPeriod’, ‘hindiAlphaPeriod’, ‘ea1JpnKorPlain’, ‘thaiNumPeriod’, ‘ea1ChsPeriod’, ‘thaiNumParenBoth’, ‘ea1ChtPeriod’, ‘romanLcParenBoth’, ‘circleNumDbPlain’, ‘hebrew2Minus’, ‘thaiAlphaParenR’, ‘ea1JpnKorPeriod’, ‘hindiNumParenR’, ‘alphaLcParenR’, ‘romanLcParenR’}

class `openpyxl.drawing.text.``CharacterProperties`(kumimoji=None, lang=None, altLang=None, sz=None, b=None, i=None, u=None, strike=None, kern=None, cap=None, spc=None, normalizeH=None, baseline=None, noProof=None, dirty=None, err=None, smtClean=None, smtId=None, bmk=None, ln=None, highlight=None, latin=None, ea=None, cs=None, sym=None, hlinkClick=None, hlinkMouseOver=None, rtl=None, extLst=None, noFill=None, solidFill=None, gradFill=None, blipFill=None, pattFill=None, grpFill=None, effectLst=None, effectDag=None, uLnTx=None, uLn=None, uFillTx=None, uFill=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `altLang`

    Values must be of type <class ‘str’>

  `b`

    Values must be of type <class ‘bool’>

  `baseline`

    Values must be of type <class ‘int’>

  `blipFill`

    Values must be of type <class ‘openpyxl.drawing.fill.BlipFillProperties’>

  `bmk`

    Values must be of type <class ‘str’>

  `cap`

    Value must be one of {‘small’, ‘all’}

  `cs`

    Values must be of type <class ‘openpyxl.drawing.text.Font’>

  `dirty`

    Values must be of type <class ‘bool’>

  `ea`

    Values must be of type <class ‘openpyxl.drawing.text.Font’>

  `effectDag`

    Values must be of type <class ‘openpyxl.drawing.effect.EffectContainer’>

  `effectLst`

    Values must be of type <class ‘openpyxl.drawing.effect.EffectList’>

  `err`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gradFill`

    Values must be of type <class ‘openpyxl.drawing.fill.GradientFillProperties’>

  `grpFill`

    Values must be of type <class ‘bool’>

  `highlight`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `hlinkClick`

    Values must be of type <class ‘openpyxl.drawing.text.Hyperlink’>

  `hlinkMouseOver`

    Values must be of type <class ‘openpyxl.drawing.text.Hyperlink’>

  `i`

    Values must be of type <class ‘bool’>

  `kern`

    Values must be of type <class ‘int’>

  `kumimoji`

    Values must be of type <class ‘bool’>

  `lang`

    Values must be of type <class ‘str’>

  `latin`

    Values must be of type <class ‘openpyxl.drawing.text.Font’>

  `ln`

    Values must be of type <class ‘openpyxl.drawing.line.LineProperties’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `noFill`

    Values must be of type <class ‘bool’>

  `noProof`

    Values must be of type <class ‘bool’>

  `normalizeH`

    Values must be of type <class ‘bool’>

  `pattFill`

    Values must be of type <class ‘openpyxl.drawing.fill.PatternFillProperties’>

  `rtl`

    Values must be of type <class ‘bool’>

  `smtClean`

    Values must be of type <class ‘bool’>

  `smtId`

    Values must be of type <class ‘int’>

  `solidFill`

    Values must be of type <class ‘openpyxl.drawing.colors.ColorChoice’>

  `spc`

    Values must be of type <class ‘int’>

  `strike`

    Value must be one of {‘sngStrike’, ‘noStrike’, ‘dblStrike’}

  `sym`

    Values must be of type <class ‘openpyxl.drawing.text.Font’>

  `sz`

    Values must be of type <class ‘float’>

  `tagname` = 'defRPr'
  `u`

    Value must be one of {‘dotDash’, ‘dbl’, ‘dotDashHeavy’, ‘words’, ‘dotted’, ‘dashHeavy’, ‘dashLongHeavy’, ‘dotDotDash’, ‘sng’, ‘wavy’, ‘wavyHeavy’, ‘heavy’, ‘dottedHeavy’, ‘dash’, ‘wavyDbl’, ‘dashLong’, ‘dotDotDashHeavy’}

  `uFill`

    Values must be of type <class ‘bool’>

  `uFillTx`

    Values must be of type <class ‘bool’>

  `uLn`

    Values must be of type <class ‘openpyxl.drawing.line.LineProperties’>

  `uLnTx`

    Values must be of type <class ‘bool’>

class `openpyxl.drawing.text.``EmbeddedWAVAudioFile`(name=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.text.``Font`(typeface=None, panose=None, pitchFamily=None, charset=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `charset`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `panose`
  `pitchFamily`

    Values must be of type <class ‘float’>

  `tagname` = 'latin'
  `typeface`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.text.``GeomGuide`(name=None, fmla=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fmla`

    Values must be of type <class ‘str’>

  `name`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.text.``GeomGuideList`(gd=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `gd`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.drawing.text.``Hyperlink`(invalidUrl=None, action=None, tgtFrame=None, tooltip=None, history=None, highlightClick=None, endSnd=None, snd=None, extLst=None, id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `action`

    Values must be of type <class ‘str’>

  `endSnd`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `highlightClick`

    Values must be of type <class ‘bool’>

  `history`

    Values must be of type <class ‘bool’>

  `id`

    Values must be of type <class ‘str’>

  `invalidUrl`

    Values must be of type <class ‘str’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `snd`

    Values must be of type <class ‘openpyxl.drawing.text.EmbeddedWAVAudioFile’>

  `tagname` = 'hlinkClick'
  `tgtFrame`

    Values must be of type <class ‘str’>

  `tooltip`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.text.``LineBreak`(rPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `rPr`

    Values must be of type <class ‘openpyxl.drawing.text.CharacterProperties’>

  `tagname` = 'br'

class `openpyxl.drawing.text.``ListStyle`(defPPr=None, lvl1pPr=None, lvl2pPr=None, lvl3pPr=None, lvl4pPr=None, lvl5pPr=None, lvl6pPr=None, lvl7pPr=None, lvl8pPr=None, lvl9pPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `defPPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `lvl1pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl2pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl3pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl4pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl5pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl6pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl7pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl8pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `lvl9pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `tagname` = 'lstStyle'

class `openpyxl.drawing.text.``Paragraph`(pPr=None, endParaRPr=None, r=None, br=None, fld=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `br`

    Values must be of type <class ‘openpyxl.drawing.text.LineBreak’>

  `endParaRPr`

    Values must be of type <class ‘openpyxl.drawing.text.CharacterProperties’>

  `fld`

    Values must be of type <class ‘openpyxl.drawing.text.TextField’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `properties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `r`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'p'
  `text`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.drawing.text.``ParagraphProperties`(marL=None, marR=None, lvl=None, indent=None, algn=None, defTabSz=None, rtl=None, eaLnBrk=None, fontAlgn=None, latinLnBrk=None, hangingPunct=None, lnSpc=None, spcBef=None, spcAft=None, tabLst=None, defRPr=None, extLst=None, buClrTx=None, buClr=None, buSzTx=None, buSzPct=None, buSzPts=None, buFontTx=None, buFont=None, buNone=None, buAutoNum=None, buChar=None, buBlip=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `algn`

    Value must be one of {‘ctr’, ‘r’, ‘thaiDist’, ‘just’, ‘dist’, ‘justLow’, ‘l’}

  `buAutoNum`

    Values must be of type <class ‘bool’>

  `buBlip`

    Values must be of type <class ‘openpyxl.drawing.fill.Blip’>

  `buChar`

    Values must be of type <class ‘str’>

  `buClr`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `buClrTx`

    Values must be of type <class ‘bool’>

  `buFont`

    Values must be of type <class ‘openpyxl.drawing.text.Font’>

  `buFontTx`

    Values must be of type <class ‘bool’>

  `buNone`

    Values must be of type <class ‘bool’>

  `buSzPct`

    Values must be of type <class ‘int’>

  `buSzPts`

    Values must be of type <class ‘int’>

  `buSzTx`

    Values must be of type <class ‘bool’>

  `defRPr`

    Values must be of type <class ‘openpyxl.drawing.text.CharacterProperties’>

  `defTabSz`

    Values must be of type <class ‘int’>

  `eaLnBrk`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fontAlgn`

    Value must be one of {‘ctr’, ‘t’, ‘b’, ‘base’, ‘auto’}

  `hangingPunct`

    Values must be of type <class ‘bool’>

  `indent`

    Values must be of type <class ‘int’>

  `latinLnBrk`

    Values must be of type <class ‘bool’>

  `lnSpc`

    Values must be of type <class ‘openpyxl.drawing.text.Spacing’>

  `lvl`

    Values must be of type <class ‘int’>

  `marL`

    Values must be of type <class ‘int’>

  `marR`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `rtl`

    Values must be of type <class ‘bool’>

  `spcAft`

    Values must be of type <class ‘openpyxl.drawing.text.Spacing’>

  `spcBef`

    Values must be of type <class ‘openpyxl.drawing.text.Spacing’>

  `tabLst`

    Values must be of type <class ‘openpyxl.drawing.text.TabStopList’>

  `tagname` = 'pPr'

class `openpyxl.drawing.text.``PresetTextShape`(prst=None, avLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `avLst`

    Values must be of type <class ‘openpyxl.drawing.text.GeomGuideList’>

  `prst`

    Values must be of type <openpyxl.descriptors.base.Set object at 0x7f753417bdd0>

class `openpyxl.drawing.text.``RegularTextRun`(rPr=None, t='')

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `properties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `rPr`

    Values must be of type <class ‘openpyxl.drawing.text.CharacterProperties’>

  `t`

    Values must be of type <class ‘str’>

  `tagname` = 'r'
  `value`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.drawing.text.``RichTextProperties`(rot=None, spcFirstLastPara=None, vertOverflow=None, horzOverflow=None, vert=None, wrap=None, lIns=None, tIns=None, rIns=None, bIns=None, numCol=None, spcCol=None, rtlCol=None, fromWordArt=None, anchor=None, anchorCtr=None, forceAA=None, upright=None, compatLnSpc=None, prstTxWarp=None, scene3d=None, extLst=None, noAutofit=None, normAutofit=None, spAutoFit=None, flatTx=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `anchor`

    Value must be one of {‘ctr’, ‘t’, ‘just’, ‘dist’, ‘b’}

  `anchorCtr`

    Values must be of type <class ‘bool’>

  `bIns`

    Values must be of type <class ‘int’>

  `compatLnSpc`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `flatTx`

    Values must be of type <class ‘int’>

  `forceAA`

    Values must be of type <class ‘bool’>

  `fromWordArt`

    Values must be of type <class ‘bool’>

  `horzOverflow`

    Value must be one of {‘overflow’, ‘clip’}

  `lIns`

    Values must be of type <class ‘int’>

  `namespace` = 'http://schemas.openxmlformats.org/drawingml/2006/main'
  `noAutofit`

    Values must be of type <class ‘bool’>

  `normAutofit`

    Values must be of type <class ‘bool’>

  `numCol`

    Values must be of type <class ‘int’>

  `prstTxWarp`

    Values must be of type <class ‘openpyxl.drawing.text.PresetTextShape’>

  `rIns`

    Values must be of type <class ‘int’>

  `rot`

    Values must be of type <class ‘int’>

  `rtlCol`

    Values must be of type <class ‘bool’>

  `scene3d`

    Values must be of type <class ‘openpyxl.drawing.geometry.Scene3D’>

  `spAutoFit`

    Values must be of type <class ‘bool’>

  `spcCol`

    Values must be of type <class ‘int’>

  `spcFirstLastPara`

    Values must be of type <class ‘bool’>

  `tIns`

    Values must be of type <class ‘int’>

  `tagname` = 'bodyPr'
  `upright`

    Values must be of type <class ‘bool’>

  `vert`

    Value must be one of {‘vert270’, ‘horz’, ‘vert’, ‘eaVert’, ‘wordArtVert’, ‘mongolianVert’, ‘wordArtVertRtl’}

  `vertOverflow`

    Value must be one of {‘overflow’, ‘clip’, ‘ellipsis’}

  `wrap`

    Value must be one of {‘square’, ‘none’}

class `openpyxl.drawing.text.``Spacing`(spcPct=None, spcPts=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `spcPct`

    Values must be of type <class ‘int’>

  `spcPts`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.text.``TabStop`(pos=None, algn=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `algn`

    Values must be of type <openpyxl.descriptors.base.Set object at 0x7f7534170990>

  `pos`

    Values must be of type <class ‘openpyxl.descriptors.base.Integer’>

class `openpyxl.drawing.text.``TabStopList`(tab=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tab`

    Values must be of type <class ‘openpyxl.drawing.text.TabStop’>

class `openpyxl.drawing.text.``TextField`(id=None, type=None, rPr=None, pPr=None, t=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘str’>

  `pPr`

    Values must be of type <class ‘openpyxl.drawing.text.ParagraphProperties’>

  `rPr`

    Values must be of type <class ‘openpyxl.drawing.text.CharacterProperties’>

  `t`

    Values must be of type <class ‘str’>

  `type`

    Values must be of type <class ‘str’>

class `openpyxl.drawing.text.``TextNormalAutofit`(fontScale=None, lnSpcReduction=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fontScale`

    Values must be of type <class ‘int’>

  `lnSpcReduction`

    Values must be of type <class ‘int’>

openpyxl.drawing.xdr module

Spreadsheet Drawing has some copies of Drawing ML elements

class `openpyxl.drawing.xdr.``XDRPoint2D`(x=None, y=None)

  Bases: `openpyxl.drawing.geometry.Point2D`

  `namespace` = None
  `x`

    Values must be of type <class ‘int’>

  `y`

    Values must be of type <class ‘int’>

class `openpyxl.drawing.xdr.``XDRPositiveSize2D`(cx=None, cy=None)

  Bases: `openpyxl.drawing.geometry.PositiveSize2D`

  `cx`

    Values must be of type <class ‘int’>

  `cy`

    Values must be of type <class ‘int’>

  `namespace` = None

class `openpyxl.drawing.xdr.``XDRTransform2D`(rot=None, flipH=None, flipV=None, off=None, ext=None, chOff=None, chExt=None)

  Bases: `openpyxl.drawing.geometry.Transform2D`

  `chExt`

    Values must be of type <class ‘openpyxl.drawing.geometry.PositiveSize2D’>

  `chOff`

    Values must be of type <class ‘openpyxl.drawing.geometry.Point2D’>

  `ext`

    Values must be of type <class ‘openpyxl.drawing.geometry.PositiveSize2D’>

  `flipH`

    Values must be of type <class ‘bool’>

  `flipV`

    Values must be of type <class ‘bool’>

  `namespace` = None
  `off`

    Values must be of type <class ‘openpyxl.drawing.geometry.Point2D’>

  `rot`

    Values must be of type <class ‘int’>

###### openpyxl.formatting package

Submodules
openpyxl.formatting.formatting module

class `openpyxl.formatting.formatting.``ConditionalFormatting`(sqref=(), pivot=None, cfRule=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cells`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `cfRule`

    A sequence (list or tuple) that may only contain objects of the declared type

  `pivot`

    Values must be of type <class ‘bool’>

  `rules`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `sqref`

    Values must be of type <class ‘openpyxl.worksheet.cell_range.MultiCellRange’>

  `tagname` = 'conditionalFormatting'

class `openpyxl.formatting.formatting.``ConditionalFormattingList`

  Bases: `object`

  Conditional formatting rules.

  `add`(range_string, cfRule)

    Add a rule such as ColorScaleRule, FormulaRule or CellIsRule

    The priority will be added automatically.

openpyxl.formatting.rule module

`openpyxl.formatting.rule.``CellIsRule`(operator=None, formula=None, stopIfTrue=None, font=None, border=None, fill=None)

  Conditional formatting rule based on cell contents.

class `openpyxl.formatting.rule.``ColorScale`(cfvo=None, color=None)

  Bases: `openpyxl.formatting.rule.RuleType`

  `color`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'colorScale'

`openpyxl.formatting.rule.``ColorScaleRule`(start_type=None, start_value=None, start_color=None, mid_type=None, mid_value=None, mid_color=None, end_type=None, end_value=None, end_color=None)

  Backwards compatibility

class `openpyxl.formatting.rule.``DataBar`(minLength=None, maxLength=None, showValue=None, cfvo=None, color=None)

  Bases: `openpyxl.formatting.rule.RuleType`

  `color`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `maxLength`

    Values must be of type <class ‘int’>

  `minLength`

    Values must be of type <class ‘int’>

  `showValue`

    Values must be of type <class ‘bool’>

  `tagname` = 'dataBar'

`openpyxl.formatting.rule.``DataBarRule`(start_type=None, start_value=None, end_type=None, end_value=None, color=None, showValue=None, minLength=None, maxLength=None)

class `openpyxl.formatting.rule.``FormatObject`(type, val=None, gte=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `gte`

    Values must be of type <class ‘bool’>

  `tagname` = 'cfvo'
  `type`

    Value must be one of {‘min’, ‘percentile’, ‘formula’, ‘num’, ‘percent’, ‘max’}

  `val`

    Values must be of type <class ‘float’>

`openpyxl.formatting.rule.``FormulaRule`(formula=None, stopIfTrue=None, font=None, border=None, fill=None)

  Conditional formatting with custom differential style

class `openpyxl.formatting.rule.``IconSet`(iconSet=None, showValue=None, percent=None, reverse=None, cfvo=None)

  Bases: `openpyxl.formatting.rule.RuleType`

  `iconSet`

    Value must be one of {‘3Signs’, ‘4Arrows’, ‘5Rating’, ‘4TrafficLights’, ‘3Flags’, ‘3Symbols2’, ‘3TrafficLights1’, ‘3Symbols’, ‘3Arrows’, ‘4ArrowsGray’, ‘4RedToBlack’, ‘4Rating’, ‘5Arrows’, ‘5ArrowsGray’, ‘3TrafficLights2’, ‘5Quarters’, ‘3ArrowsGray’}

  `percent`

    Values must be of type <class ‘bool’>

  `reverse`

    Values must be of type <class ‘bool’>

  `showValue`

    Values must be of type <class ‘bool’>

  `tagname` = 'iconSet'

`openpyxl.formatting.rule.``IconSetRule`(icon_style=None, type=None, values=None, showValue=None, percent=None, reverse=None)

  Convenience function for creating icon set rules

class `openpyxl.formatting.rule.``Rule`(type, dxfId=None, priority=0, stopIfTrue=None, aboveAverage=None, percent=None, bottom=None, operator=None, text=None, timePeriod=None, rank=None, stdDev=None, equalAverage=None, formula=(), colorScale=None, dataBar=None, iconSet=None, extLst=None, dxf=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `aboveAverage`

    Values must be of type <class ‘bool’>

  `bottom`

    Values must be of type <class ‘bool’>

  `colorScale`

    Values must be of type <class ‘openpyxl.formatting.rule.ColorScale’>

  `dataBar`

    Values must be of type <class ‘openpyxl.formatting.rule.DataBar’>

  `dxf`

    Values must be of type <class ‘openpyxl.styles.differential.DifferentialStyle’>

  `dxfId`

    Values must be of type <class ‘int’>

  `equalAverage`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `formula`

    A sequence (list or tuple) that may only contain objects of the declared type

  `iconSet`

    Values must be of type <class ‘openpyxl.formatting.rule.IconSet’>

  `operator`

    Value must be one of {‘between’, ‘notContains’, ‘containsText’, ‘beginsWith’, ‘lessThan’, ‘lessThanOrEqual’, ‘notEqual’, ‘equal’, ‘greaterThanOrEqual’, ‘greaterThan’, ‘notBetween’, ‘endsWith’}

  `percent`

    Values must be of type <class ‘bool’>

  `priority`

    Values must be of type <class ‘int’>

  `rank`

    Values must be of type <class ‘int’>

  `stdDev`

    Values must be of type <class ‘int’>

  `stopIfTrue`

    Values must be of type <class ‘bool’>

  `tagname` = 'cfRule'
  `text`

    Values must be of type <class ‘str’>

  `timePeriod`

    Value must be one of {‘thisMonth’, ‘thisWeek’, ‘lastMonth’, ‘yesterday’, ‘nextMonth’, ‘nextWeek’, ‘tomorrow’, ‘today’, ‘last7Days’, ‘lastWeek’}

  `type`

    Value must be one of {‘expression’, ‘timePeriod’, ‘colorScale’, ‘notContainsErrors’, ‘dataBar’, ‘notContainsText’, ‘duplicateValues’, ‘containsErrors’, ‘endsWith’, ‘containsBlanks’, ‘aboveAverage’, ‘cellIs’, ‘top10’, ‘uniqueValues’, ‘beginsWith’, ‘containsText’, ‘notContainsBlanks’, ‘iconSet’}

class `openpyxl.formatting.rule.``RuleType`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cfvo`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.formatting.rule.``ValueDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Float`

  Expected type depends upon type attribue of parent :-(

  Most values should be numeric BUT they can also be cell references

###### openpyxl.packaging package

Stuff related to Office OpenXML packaging: relationships, archive, content types.

Submodules
openpyxl.packaging.core module

class `openpyxl.packaging.core.``DocumentProperties`(category=None, contentStatus=None, keywords=None, lastModifiedBy=None, lastPrinted=None, revision=None, version=None, created=datetime.datetime(2022, 5, 24, 6, 51, 17, 540094), creator='openpyxl', description=None, identifier=None, language=None, modified=datetime.datetime(2022, 5, 24, 6, 51, 17, 540096), subject=None, title=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  High-level properties of the document. Defined in ECMA-376 Par2 Annex D

  `category`

    Values must be of type <class ‘str’>

  `contentStatus`

    Values must be of type <class ‘str’>

  `created`

    Values must be of type <class ‘datetime.datetime’>

  `creator`

    Values must be of type <class ‘str’>

  `description`

    Values must be of type <class ‘str’>

  `identifier`

    Values must be of type <class ‘str’>

  `keywords`

    Values must be of type <class ‘str’>

  `language`

    Values must be of type <class ‘str’>

  `lastModifiedBy`

    Values must be of type <class ‘str’>

  `lastPrinted`

    Values must be of type <class ‘datetime.datetime’>

  `last_modified_by`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `modified`

    Values must be of type <class ‘datetime.datetime’>

  `namespace` = 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'
  `revision`

    Values must be of type <class ‘str’>

  `subject`

    Values must be of type <class ‘str’>

  `tagname` = 'coreProperties'
  `title`

    Values must be of type <class ‘str’>

  `version`

    Values must be of type <class ‘str’>

class `openpyxl.packaging.core.``NestedDateTime`(*args, **kw)

  Bases: `openpyxl.descriptors.base.DateTime`, `openpyxl.descriptors.nested.NestedText`

  `expected_type`

    alias of `datetime.datetime`

  `to_tree`(tagname=None, value=None, namespace=None)

class `openpyxl.packaging.core.``QualifiedDateTime`(*args, **kw)

  Bases: `openpyxl.packaging.core.NestedDateTime`

  In certain situations Excel will complain if the additional type attribute isn’t set

  `to_tree`(tagname=None, value=None, namespace=None)

openpyxl.packaging.extended module

class `openpyxl.packaging.extended.``DigSigBlob`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.packaging.extended.``ExtendedProperties`(Template=None, Manager=None, Company=None, Pages=None, Words=None, Characters=None, PresentationFormat=None, Lines=None, Paragraphs=None, Slides=None, Notes=None, TotalTime=None, HiddenSlides=None, MMClips=None, ScaleCrop=None, HeadingPairs=None, TitlesOfParts=None, LinksUpToDate=None, CharactersWithSpaces=None, SharedDoc=None, HyperlinkBase=None, HLinks=None, HyperlinksChanged=None, DigSig=None, Application='Microsoft Excel', AppVersion=None, DocSecurity=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  See 22.2

  Most of this is irrelevant

  `AppVersion`

    Values must be of type <class ‘str’>

  `Application`

    Values must be of type <class ‘str’>

  `Characters`

    Values must be of type <class ‘int’>

  `CharactersWithSpaces`

    Values must be of type <class ‘int’>

  `Company`

    Values must be of type <class ‘str’>

  `DigSig`

    Values must be of type <class ‘openpyxl.packaging.extended.DigSigBlob’>

  `DocSecurity`

    Values must be of type <class ‘int’>

  `HLinks`

    Values must be of type <class ‘openpyxl.packaging.extended.VectorVariant’>

  `HeadingPairs`

    Values must be of type <class ‘openpyxl.packaging.extended.VectorVariant’>

  `HiddenSlides`

    Values must be of type <class ‘int’>

  `HyperlinkBase`

    Values must be of type <class ‘str’>

  `HyperlinksChanged`

    Values must be of type <class ‘bool’>

  `Lines`

    Values must be of type <class ‘int’>

  `LinksUpToDate`

    Values must be of type <class ‘bool’>

  `MMClips`

    Values must be of type <class ‘int’>

  `Manager`

    Values must be of type <class ‘str’>

  `Notes`

    Values must be of type <class ‘int’>

  `Pages`

    Values must be of type <class ‘int’>

  `Paragraphs`

    Values must be of type <class ‘int’>

  `PresentationFormat`

    Values must be of type <class ‘str’>

  `ScaleCrop`

    Values must be of type <class ‘bool’>

  `SharedDoc`

    Values must be of type <class ‘bool’>

  `Slides`

    Values must be of type <class ‘int’>

  `Template`

    Values must be of type <class ‘str’>

  `TitlesOfParts`

    Values must be of type <class ‘openpyxl.packaging.extended.VectorLpstr’>

  `TotalTime`

    Values must be of type <class ‘int’>

  `Words`

    Values must be of type <class ‘int’>

  `tagname` = 'Properties'
  `to_tree`()

class `openpyxl.packaging.extended.``VectorLpstr`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

class `openpyxl.packaging.extended.``VectorVariant`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

`openpyxl.packaging.extended.``get_version`()

openpyxl.packaging.interface module

class `openpyxl.packaging.interface.``ISerialisableFile`

  Bases: `abc.ABC`

  Interface for Serialisable classes that represent files in the archive

  `id`

    Object id making it unique

openpyxl.packaging.manifest module

File manifest

class `openpyxl.packaging.manifest.``FileExtension`(Extension, ContentType)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ContentType`

    Values must be of type <class ‘str’>

  `Extension`

    Values must be of type <class ‘str’>

  `tagname` = 'Default'

class `openpyxl.packaging.manifest.``Manifest`(Default=(), Override=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `Default`

    A sequence (list or tuple) that may only contain objects of the declared type

  `Override`

    A sequence (list or tuple) that may only contain objects of the declared type

  `append`(obj)

    Add content object to the package manifest # needs a contract…

  `extensions`

    Map content types to file extensions Skip parts without extensions

  `filenames`
  `find`(content_type)

    Find specific content-type

  `findall`(content_type)

    Find all elements of a specific content-type

  `path` = '[Content_Types].xml'
  `tagname` = 'Types'
  `to_tree`()

    Custom serialisation method to allow setting a default namespace

class `openpyxl.packaging.manifest.``Override`(PartName, ContentType)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ContentType`

    Values must be of type <class ‘str’>

  `PartName`

    Values must be of type <class ‘str’>

  `tagname` = 'Override'

openpyxl.packaging.relationship module

class `openpyxl.packaging.relationship.``Relationship`(Id=None, Type=None, type=None, Target=None, TargetMode=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Represents many kinds of relationships.

  `Id`

    Values must be of type <class ‘str’>

  `Target`

    Values must be of type <class ‘str’>

  `TargetMode`

    Values must be of type <class ‘str’>

  `Type`

    Values must be of type <class ‘str’>

  `id`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'Relationship'
  `target`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.packaging.relationship.``RelationshipList`(Relationship=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `Relationship`

    A sequence (list or tuple) that may only contain objects of the declared type

  `append`(value)
  `find`(content_type)

    Find relationships by content-type NB. these content-types namespaced objects and different to the MIME-types in the package manifest :-(

  `tagname` = 'Relationships'
  `to_tree`()

`openpyxl.packaging.relationship.``get_dependents`(archive, filename)

  Normalise dependency file paths to absolute ones

  Relative paths are relative to parent object

`openpyxl.packaging.relationship.``get_rel`(archive, deps, id=None, cls=None)

  Get related object based on id or rel_type

`openpyxl.packaging.relationship.``get_rels_path`(path)

  Convert relative path to absolutes that can be loaded from a zip archive. The path to be passed in is that of containing object (workbook, worksheet, etc.)

openpyxl.packaging.workbook module

class `openpyxl.packaging.workbook.``ChildSheet`(name=None, sheetId=None, state='visible', id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Represents a reference to a worksheet or chartsheet in workbook.xml

  It contains the title, order and state but only an indirect reference to the objects themselves.

  `id`

    Values must be of type <class ‘str’>

  `name`

    Values must be of type <class ‘str’>

  `sheetId`

    Values must be of type <class ‘int’>

  `state`

    Value must be one of {‘visible’, ‘veryHidden’, ‘hidden’}

  `tagname` = 'sheet'

class `openpyxl.packaging.workbook.``FileRecoveryProperties`(autoRecover=None, crashSave=None, dataExtractLoad=None, repairLoad=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoRecover`

    Values must be of type <class ‘bool’>

  `crashSave`

    Values must be of type <class ‘bool’>

  `dataExtractLoad`

    Values must be of type <class ‘bool’>

  `repairLoad`

    Values must be of type <class ‘bool’>

  `tagname` = 'fileRecoveryPr'

class `openpyxl.packaging.workbook.``PivotCache`(cacheId=None, id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cacheId`

    Values must be of type <class ‘int’>

  `id`

    Values must be of type <class ‘str’>

  `tagname` = 'pivotCache'

class `openpyxl.packaging.workbook.``WorkbookPackage`(conformance=None, fileVersion=None, fileSharing=None, workbookPr=None, workbookProtection=None, bookViews=(), sheets=(), functionGroups=None, externalReferences=(), definedNames=None, calcPr=None, oleSize=None, customWorkbookViews=(), pivotCaches=(), smartTagPr=None, smartTagTypes=None, webPublishing=None, fileRecoveryPr=None, webPublishObjects=None, extLst=None, Ignorable=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Represent the workbook file in the archive

  `Ignorable`

    Values must be of type <class ‘str’>

  `active`
  `bookViews`

    Wrap a sequence in an containing object

  `calcPr`

    Values must be of type <class ‘openpyxl.workbook.properties.CalcProperties’>

  `conformance`

    Value must be one of {‘strict’, ‘transitional’}

  `customWorkbookViews`

    Wrap a sequence in an containing object

  `definedNames`

    Values must be of type <class ‘openpyxl.workbook.defined_name.DefinedNameList’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `externalReferences`

    Wrap a sequence in an containing object

  `fileRecoveryPr`

    Values must be of type <class ‘openpyxl.packaging.workbook.FileRecoveryProperties’>

  `fileSharing`

    Values must be of type <class ‘openpyxl.workbook.protection.FileSharing’>

  `fileVersion`

    Values must be of type <class ‘openpyxl.workbook.properties.FileVersion’>

  `functionGroups`

    Values must be of type <class ‘openpyxl.workbook.function_group.FunctionGroupList’>

  `oleSize`

    Values must be of type <class ‘str’>

  `pivotCaches`

    Wrap a sequence in an containing object

  `pivot_caches`

    Get PivotCache objects

  `properties`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `sheets`

    Wrap a sequence in an containing object

  `smartTagPr`

    Values must be of type <class ‘openpyxl.workbook.smart_tags.SmartTagProperties’>

  `smartTagTypes`

    Values must be of type <class ‘openpyxl.workbook.smart_tags.SmartTagList’>

  `tagname` = 'workbook'
  `to_tree`()
  `webPublishObjects`

    Values must be of type <class ‘openpyxl.workbook.web.WebPublishObjectList’>

  `webPublishing`

    Values must be of type <class ‘openpyxl.workbook.web.WebPublishing’>

  `workbookPr`

    Values must be of type <class ‘openpyxl.workbook.properties.WorkbookProperties’>

  `workbookProtection`

    Values must be of type <class ‘openpyxl.workbook.protection.WorkbookProtection’>

###### openpyxl.pivot package

Submodules
openpyxl.pivot.cache module

class `openpyxl.pivot.cache.``CacheDefinition`(invalid=None, saveData=None, refreshOnLoad=None, optimizeMemory=None, enableRefresh=None, refreshedBy=None, refreshedDate=None, refreshedDateIso=None, backgroundQuery=None, missingItemsLimit=None, createdVersion=None, refreshedVersion=None, minRefreshableVersion=None, recordCount=None, upgradeOnRefresh=None, tupleCache=None, supportSubquery=None, supportAdvancedDrill=None, cacheSource=None, cacheFields=(), cacheHierarchies=(), kpis=(), calculatedItems=(), calculatedMembers=(), dimensions=(), measureGroups=(), maps=(), extLst=None, id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `backgroundQuery`

    Values must be of type <class ‘bool’>

  `cacheFields`

    Wrap a sequence in an containing object

  `cacheHierarchies`

    Wrap a sequence in an containing object

  `cacheSource`

    Values must be of type <class ‘openpyxl.pivot.cache.CacheSource’>

  `calculatedItems`

    Wrap a sequence in an containing object

  `calculatedMembers`

    Wrap a sequence in an containing object

  `createdVersion`

    Values must be of type <class ‘int’>

  `dimensions`

    Wrap a sequence in an containing object

  `enableRefresh`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `id`

    Values must be of type <class ‘str’>

  `invalid`

    Values must be of type <class ‘bool’>

  `kpis`

    Wrap a sequence in an containing object

  `maps`

    Wrap a sequence in an containing object

  `measureGroups`

    Wrap a sequence in an containing object

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml'
  `minRefreshableVersion`

    Values must be of type <class ‘int’>

  `missingItemsLimit`

    Values must be of type <class ‘int’>

  `optimizeMemory`

    Values must be of type <class ‘bool’>

  `path`
  `recordCount`

    Values must be of type <class ‘int’>

  `records` = None
  `refreshOnLoad`

    Values must be of type <class ‘bool’>

  `refreshedBy`

    Values must be of type <class ‘str’>

  `refreshedDate`

    Values must be of type <class ‘float’>

  `refreshedDateIso`

    Values must be of type <class ‘datetime.datetime’>

  `refreshedVersion`

    Values must be of type <class ‘int’>

  `rel_type` = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition'
  `saveData`

    Values must be of type <class ‘bool’>

  `supportAdvancedDrill`

    Values must be of type <class ‘bool’>

  `supportSubquery`

    Values must be of type <class ‘bool’>

  `tagname` = 'pivotCacheDefinition'
  `to_tree`()
  `tupleCache`

    Values must be of type <class ‘openpyxl.pivot.cache.TupleCache’>

  `upgradeOnRefresh`

    Values must be of type <class ‘bool’>

class `openpyxl.pivot.cache.``CacheField`(sharedItems=None, fieldGroup=None, mpMap=None, extLst=None, name=None, caption=None, propertyName=None, serverField=None, uniqueList=True, numFmtId=None, formula=None, sqlType=0, hierarchy=0, level=0, databaseField=True, mappingCount=None, memberPropertyField=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caption`

    Values must be of type <class ‘str’>

  `databaseField`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fieldGroup`

    Values must be of type <class ‘openpyxl.pivot.cache.FieldGroup’>

  `formula`

    Values must be of type <class ‘str’>

  `hierarchy`

    Values must be of type <class ‘int’>

  `level`

    Values must be of type <class ‘int’>

  `mappingCount`

    Values must be of type <class ‘int’>

  `memberPropertyField`

    Values must be of type <class ‘bool’>

  `mpMap`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `numFmtId`

    Values must be of type <class ‘int’>

  `propertyName`

    Values must be of type <class ‘str’>

  `serverField`

    Values must be of type <class ‘bool’>

  `sharedItems`

    Values must be of type <class ‘openpyxl.pivot.cache.SharedItems’>

  `sqlType`

    Values must be of type <class ‘int’>

  `tagname` = 'cacheField'
  `uniqueList`

    Values must be of type <class ‘bool’>

class `openpyxl.pivot.cache.``CacheHierarchy`(uniqueName='', caption=None, measure=None, set=None, parentSet=None, iconSet=0, attribute=None, time=None, keyAttribute=None, defaultMemberUniqueName=None, allUniqueName=None, allCaption=None, dimensionUniqueName=None, displayFolder=None, measureGroup=None, measures=None, count=None, oneField=None, memberValueDatatype=None, unbalanced=None, unbalancedGroup=None, hidden=None, fieldsUsage=None, groupLevels=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `allCaption`

    Values must be of type <class ‘str’>

  `allUniqueName`

    Values must be of type <class ‘str’>

  `attribute`

    Values must be of type <class ‘bool’>

  `caption`

    Values must be of type <class ‘str’>

  `count`

    Values must be of type <class ‘int’>

  `defaultMemberUniqueName`

    Values must be of type <class ‘str’>

  `dimensionUniqueName`

    Values must be of type <class ‘str’>

  `displayFolder`

    Values must be of type <class ‘str’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fieldsUsage`

    Values must be of type <class ‘openpyxl.pivot.cache.FieldsUsage’>

  `groupLevels`

    Values must be of type <class ‘openpyxl.pivot.cache.GroupLevels’>

  `hidden`

    Values must be of type <class ‘bool’>

  `iconSet`

    Values must be of type <class ‘int’>

  `keyAttribute`

    Values must be of type <class ‘bool’>

  `measure`

    Values must be of type <class ‘bool’>

  `measureGroup`

    Values must be of type <class ‘str’>

  `measures`

    Values must be of type <class ‘bool’>

  `memberValueDatatype`

    Values must be of type <class ‘int’>

  `oneField`

    Values must be of type <class ‘bool’>

  `parentSet`

    Values must be of type <class ‘int’>

  `set`

    Values must be of type <class ‘bool’>

  `tagname` = 'cacheHierarchy'
  `time`

    Values must be of type <class ‘bool’>

  `unbalanced`

    Values must be of type <class ‘bool’>

  `unbalancedGroup`

    Values must be of type <class ‘bool’>

  `uniqueName`

    Values must be of type <class ‘str’>

class `openpyxl.pivot.cache.``CacheSource`(type=None, connectionId=None, worksheetSource=None, consolidation=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `connectionId`

    Values must be of type <class ‘int’>

  `consolidation`

    Values must be of type <class ‘openpyxl.pivot.cache.Consolidation’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `tagname` = 'cacheSource'
  `type`

    Value must be one of {‘scenario’, ‘external’, ‘worksheet’, ‘consolidation’}

  `worksheetSource`

    Values must be of type <class ‘openpyxl.pivot.cache.WorksheetSource’>

class `openpyxl.pivot.cache.``CalculatedItem`(field=None, formula=None, pivotArea=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `field`

    Values must be of type <class ‘int’>

  `formula`

    Values must be of type <class ‘str’>

  `pivotArea`

    Values must be of type <class ‘openpyxl.pivot.table.PivotArea’>

  `tagname` = 'calculatedItem'

class `openpyxl.pivot.cache.``CalculatedMember`(name=None, mdx=None, memberName=None, hierarchy=None, parent=None, solveOrder=None, set=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `hierarchy`

    Values must be of type <class ‘str’>

  `mdx`

    Values must be of type <class ‘str’>

  `memberName`

    Values must be of type <class ‘str’>

  `name`

    Values must be of type <class ‘str’>

  `parent`

    Values must be of type <class ‘str’>

  `set`

    Values must be of type <class ‘bool’>

  `solveOrder`

    Values must be of type <class ‘int’>

  `tagname` = 'calculatedMember'

class `openpyxl.pivot.cache.``Consolidation`(autoPage=None, pages=(), rangeSets=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoPage`

    Values must be of type <class ‘bool’>

  `pages`

    Wrap a sequence in an containing object

  `rangeSets`

    Wrap a sequence in an containing object

  `tagname` = 'consolidation'

class `openpyxl.pivot.cache.``DiscretePr`(count=None, x=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `tagname` = 'discretePr'
  `x`

    Values must be of type <class ‘int’>

class `openpyxl.pivot.cache.``FieldGroup`(par=None, base=None, rangePr=None, discretePr=None, groupItems=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `base`

    Values must be of type <class ‘int’>

  `discretePr`

    Values must be of type <class ‘openpyxl.pivot.cache.DiscretePr’>

  `groupItems`

    Values must be of type <class ‘openpyxl.pivot.cache.GroupItems’>

  `par`

    Values must be of type <class ‘int’>

  `rangePr`

    Values must be of type <class ‘openpyxl.pivot.cache.RangePr’>

  `tagname` = 'fieldGroup'

class `openpyxl.pivot.cache.``FieldUsage`(x=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tagname` = 'fieldUsage'
  `x`

    Values must be of type <class ‘int’>

class `openpyxl.pivot.cache.``FieldsUsage`(count=None, fieldUsage=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `fieldUsage`

    Values must be of type <class ‘openpyxl.pivot.cache.FieldUsage’>

class `openpyxl.pivot.cache.``GroupItems`(count=None, m=(), n=(), b=(), e=(), s=(), d=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    A sequence (list or tuple) that may only contain objects of the declared type

  `count`
  `d`

    A sequence (list or tuple) that may only contain objects of the declared type

  `e`

    A sequence (list or tuple) that may only contain objects of the declared type

  `m`

    A sequence (list or tuple) that may only contain objects of the declared type

  `n`

    A sequence (list or tuple) that may only contain objects of the declared type

  `s`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'groupItems'

class `openpyxl.pivot.cache.``GroupLevel`(uniqueName=None, caption=None, user=None, customRollUp=None, groups=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caption`

    Values must be of type <class ‘str’>

  `customRollUp`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `groups`

    Values must be of type <class ‘openpyxl.pivot.cache.Groups’>

  `tagname` = 'groupLevel'
  `uniqueName`

    Values must be of type <class ‘str’>

  `user`

    Values must be of type <class ‘bool’>

class `openpyxl.pivot.cache.``GroupLevels`(count=None, groupLevel=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `groupLevel`

    Values must be of type <class ‘openpyxl.pivot.cache.GroupLevel’>

class `openpyxl.pivot.cache.``GroupMember`(uniqueName=None, group=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `group`

    Values must be of type <class ‘bool’>

  `tagname` = 'groupMember'
  `uniqueName`

    Values must be of type <class ‘str’>

class `openpyxl.pivot.cache.``GroupMembers`(count=None, groupMember=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `groupMember`

    Values must be of type <class ‘openpyxl.pivot.cache.GroupMember’>

class `openpyxl.pivot.cache.``Groups`(count=None, group=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `group`

    Values must be of type <class ‘openpyxl.pivot.cache.LevelGroup’>

  `tagname` = 'groups'

class `openpyxl.pivot.cache.``LevelGroup`(name=None, uniqueName=None, caption=None, uniqueParent=None, id=None, groupMembers=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caption`

    Values must be of type <class ‘str’>

  `groupMembers`

    Values must be of type <class ‘openpyxl.pivot.cache.GroupMembers’>

  `id`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'levelGroup'
  `uniqueName`

    Values must be of type <class ‘str’>

  `uniqueParent`

    Values must be of type <class ‘str’>

class `openpyxl.pivot.cache.``MeasureDimensionMap`(measureGroup=None, dimension=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `dimension`

    Values must be of type <class ‘int’>

  `measureGroup`

    Values must be of type <class ‘int’>

  `tagname` = 'map'

class `openpyxl.pivot.cache.``MeasureGroup`(name=None, caption=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caption`

    Values must be of type <class ‘str’>

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'measureGroup'

class `openpyxl.pivot.cache.``OLAPSet`(count=None, maxRank=None, setDefinition=None, sortType=None, queryFailed=None, tpls=None, sortByTuple=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `maxRank`

    Values must be of type <class ‘int’>

  `queryFailed`

    Values must be of type <class ‘bool’>

  `setDefinition`

    Values must be of type <class ‘str’>

  `sortByTuple`

    Values must be of type <class ‘openpyxl.pivot.fields.TupleList’>

  `sortType`

    Value must be one of {‘ascendingNatural’, ‘ascendingAlpha’, ‘descending’, ‘descendingNatural’, ‘ascending’, ‘descendingAlpha’}

  `tagname` = 'set'
  `tpls`

    Values must be of type <class ‘openpyxl.pivot.fields.TupleList’>

class `openpyxl.pivot.cache.``OLAPSets`(count=None, set=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `set`

    Values must be of type <class ‘openpyxl.pivot.cache.OLAPSet’>

class `openpyxl.pivot.cache.``PCDKPI`(uniqueName=None, caption=None, displayFolder=None, measureGroup=None, parent=None, value=None, goal=None, status=None, trend=None, weight=None, time=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caption`

    Values must be of type <class ‘str’>

  `displayFolder`

    Values must be of type <class ‘str’>

  `goal`

    Values must be of type <class ‘str’>

  `measureGroup`

    Values must be of type <class ‘str’>

  `parent`

    Values must be of type <class ‘str’>

  `status`

    Values must be of type <class ‘str’>

  `tagname` = 'pCDKPI'
  `time`

    Values must be of type <class ‘str’>

  `trend`

    Values must be of type <class ‘str’>

  `uniqueName`

    Values must be of type <class ‘str’>

  `value`

    Values must be of type <class ‘str’>

  `weight`

    Values must be of type <class ‘str’>

class `openpyxl.pivot.cache.``PCDSDTCEntries`(count=None, m=None, n=None, e=None, s=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `e`

    Values must be of type <class ‘openpyxl.pivot.fields.Error’>

  `m`

    Values must be of type <class ‘openpyxl.pivot.fields.Missing’>

  `n`

    Values must be of type <class ‘openpyxl.pivot.fields.Number’>

  `s`

    Values must be of type <class ‘openpyxl.pivot.fields.Text’>

  `tagname` = 'pCDSDTCEntries'

class `openpyxl.pivot.cache.``Page`(count=None, pageItem=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `pageItem`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'PCDSCPage'

class `openpyxl.pivot.cache.``PageItem`(name=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'pageItem'

class `openpyxl.pivot.cache.``PivotDimension`(measure=None, name=None, uniqueName=None, caption=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caption`

    Values must be of type <class ‘str’>

  `measure`

    Values must be of type <class ‘bool’>

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'dimension'
  `uniqueName`

    Values must be of type <class ‘str’>

class `openpyxl.pivot.cache.``Query`(mdx=None, tpls=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `mdx`

    Values must be of type <class ‘str’>

  `tagname` = 'query'
  `tpls`

    Values must be of type <class ‘openpyxl.pivot.fields.TupleList’>

class `openpyxl.pivot.cache.``QueryCache`(count=None, query=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `query`

    Values must be of type <class ‘openpyxl.pivot.cache.Query’>

  `tagname` = 'queryCache'

class `openpyxl.pivot.cache.``RangePr`(autoStart=True, autoEnd=True, groupBy='range', startNum=None, endNum=None, startDate=None, endDate=None, groupInterval=1)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoEnd`

    Values must be of type <class ‘bool’>

  `autoStart`

    Values must be of type <class ‘bool’>

  `endDate`

    Values must be of type <class ‘datetime.datetime’>

  `endNum`

    Values must be of type <class ‘float’>

  `groupBy`

    Value must be one of {‘range’, ‘years’, ‘minutes’, ‘days’, ‘seconds’, ‘months’, ‘quarters’, ‘hours’}

  `groupInterval`

    Values must be of type <class ‘float’>

  `startDate`

    Values must be of type <class ‘datetime.datetime’>

  `startNum`

    Values must be of type <class ‘float’>

  `tagname` = 'rangePr'

class `openpyxl.pivot.cache.``RangeSet`(i1=None, i2=None, i3=None, i4=None, ref=None, name=None, sheet=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `i1`

    Values must be of type <class ‘int’>

  `i2`

    Values must be of type <class ‘int’>

  `i3`

    Values must be of type <class ‘int’>

  `i4`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `ref`

    Values must be of type <class ‘str’>

  `sheet`

    Values must be of type <class ‘str’>

  `tagname` = 'rangeSet'

class `openpyxl.pivot.cache.``ServerFormat`(culture=None, format=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `culture`

    Values must be of type <class ‘str’>

  `format`

    Values must be of type <class ‘str’>

  `tagname` = 'serverFormat'

class `openpyxl.pivot.cache.``ServerFormatList`(count=None, serverFormat=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `serverFormat`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'serverFormats'

class `openpyxl.pivot.cache.``SharedItems`(_fields=(), containsSemiMixedTypes=None, containsNonDate=None, containsDate=None, containsString=None, containsBlank=None, containsMixedTypes=None, containsNumber=None, containsInteger=None, minValue=None, maxValue=None, minDate=None, maxDate=None, count=None, longText=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `containsBlank`

    Values must be of type <class ‘bool’>

  `containsDate`

    Values must be of type <class ‘bool’>

  `containsInteger`

    Values must be of type <class ‘bool’>

  `containsMixedTypes`

    Values must be of type <class ‘bool’>

  `containsNonDate`

    Values must be of type <class ‘bool’>

  `containsNumber`

    Values must be of type <class ‘bool’>

  `containsSemiMixedTypes`

    Values must be of type <class ‘bool’>

  `containsString`

    Values must be of type <class ‘bool’>

  `count`
  `d`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `e`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `longText`

    Values must be of type <class ‘bool’>

  `m`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `maxDate`

    Values must be of type <class ‘datetime.datetime’>

  `maxValue`

    Values must be of type <class ‘float’>

  `minDate`

    Values must be of type <class ‘datetime.datetime’>

  `minValue`

    Values must be of type <class ‘float’>

  `n`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `s`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `tagname` = 'sharedItems'

class `openpyxl.pivot.cache.``TupleCache`(entries=None, sets=None, queryCache=None, serverFormats=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `entries`

    Values must be of type <class ‘openpyxl.pivot.cache.PCDSDTCEntries’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `queryCache`

    Values must be of type <class ‘openpyxl.pivot.cache.QueryCache’>

  `serverFormats`

    Values must be of type <class ‘openpyxl.pivot.cache.ServerFormatList’>

  `sets`

    Values must be of type <class ‘openpyxl.pivot.cache.OLAPSets’>

  `tagname` = 'tupleCache'

class `openpyxl.pivot.cache.``WorksheetSource`(ref=None, name=None, sheet=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `ref`

    Values must be of type <class ‘str’>

  `sheet`

    Values must be of type <class ‘str’>

  `tagname` = 'worksheetSource'

openpyxl.pivot.fields module

class `openpyxl.pivot.fields.``Boolean`(x=(), v=None, u=None, f=None, c=None, cp=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `c`

    Values must be of type <class ‘str’>

  `cp`

    Values must be of type <class ‘int’>

  `f`

    Values must be of type <class ‘bool’>

  `tagname` = 'b'
  `u`

    Values must be of type <class ‘bool’>

  `v`

    Values must be of type <class ‘bool’>

  `x`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.pivot.fields.``DateTimeField`(x=(), v=None, u=None, f=None, c=None, cp=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `c`

    Values must be of type <class ‘str’>

  `cp`

    Values must be of type <class ‘int’>

  `f`

    Values must be of type <class ‘bool’>

  `tagname` = 'd'
  `u`

    Values must be of type <class ‘bool’>

  `v`

    Values must be of type <class ‘datetime.datetime’>

  `x`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.pivot.fields.``Error`(tpls=None, x=(), v=None, u=None, f=None, c=None, cp=None, _in=None, bc=None, fc=None, i=None, un=None, st=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Values must be of type <class ‘bool’>

  `bc`
  `c`

    Values must be of type <class ‘str’>

  `cp`

    Values must be of type <class ‘int’>

  `f`

    Values must be of type <class ‘bool’>

  `fc`
  `i`

    Values must be of type <class ‘bool’>

  `st`

    Values must be of type <class ‘bool’>

  `tagname` = 'e'
  `tpls`

    Values must be of type <class ‘openpyxl.pivot.fields.TupleList’>

  `u`

    Values must be of type <class ‘bool’>

  `un`

    Values must be of type <class ‘bool’>

  `v`

    Values must be of type <class ‘str’>

  `x`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.pivot.fields.``Index`(v=0)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tagname` = 'x'
  `v`

    Values must be of type <class ‘int’>

class `openpyxl.pivot.fields.``Missing`(tpls=(), x=(), u=None, f=None, c=None, cp=None, _in=None, bc=None, fc=None, i=None, un=None, st=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Values must be of type <class ‘bool’>

  `bc`
  `c`

    Values must be of type <class ‘str’>

  `cp`

    Values must be of type <class ‘int’>

  `f`

    Values must be of type <class ‘bool’>

  `fc`
  `i`

    Values must be of type <class ‘bool’>

  `st`

    Values must be of type <class ‘bool’>

  `tagname` = 'm'
  `tpls`

    A sequence (list or tuple) that may only contain objects of the declared type

  `u`

    Values must be of type <class ‘bool’>

  `un`

    Values must be of type <class ‘bool’>

  `x`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.pivot.fields.``Number`(tpls=(), x=(), v=None, u=None, f=None, c=None, cp=None, _in=None, bc=None, fc=None, i=None, un=None, st=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Values must be of type <class ‘bool’>

  `bc`
  `c`

    Values must be of type <class ‘str’>

  `cp`

    Values must be of type <class ‘int’>

  `f`

    Values must be of type <class ‘bool’>

  `fc`
  `i`

    Values must be of type <class ‘bool’>

  `st`

    Values must be of type <class ‘bool’>

  `tagname` = 'n'
  `tpls`

    A sequence (list or tuple) that may only contain objects of the declared type

  `u`

    Values must be of type <class ‘bool’>

  `un`

    Values must be of type <class ‘bool’>

  `v`

    Values must be of type <class ‘float’>

  `x`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.pivot.fields.``Text`(tpls=(), x=(), v=None, u=None, f=None, c=None, cp=None, _in=None, bc=None, fc=None, i=None, un=None, st=None, b=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Values must be of type <class ‘bool’>

  `bc`
  `c`

    Values must be of type <class ‘str’>

  `cp`

    Values must be of type <class ‘int’>

  `f`

    Values must be of type <class ‘bool’>

  `fc`
  `i`

    Values must be of type <class ‘bool’>

  `st`

    Values must be of type <class ‘bool’>

  `tagname` = 's'
  `tpls`

    A sequence (list or tuple) that may only contain objects of the declared type

  `u`

    Values must be of type <class ‘bool’>

  `un`

    Values must be of type <class ‘bool’>

  `v`

    Values must be of type <class ‘str’>

  `x`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.pivot.fields.``Tuple`(fld=None, hier=None, item=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `fld`

    Values must be of type <class ‘int’>

  `hier`

    Values must be of type <class ‘int’>

  `item`

    Values must be of type <class ‘int’>

class `openpyxl.pivot.fields.``TupleList`(c=None, tpl=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `c`

    Values must be of type <class ‘int’>

  `tpl`

    Values must be of type <class ‘openpyxl.pivot.fields.Tuple’>

openpyxl.pivot.record module

class `openpyxl.pivot.record.``Record`(_fields=(), m=None, n=None, b=None, e=None, s=None, d=None, x=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `b`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `d`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `e`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `m`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `n`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `s`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  `tagname` = 'r'
  `x`

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

class `openpyxl.pivot.record.``RecordList`(count=None, r=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml'
  `path`
  `r`

    A sequence (list or tuple) that may only contain objects of the declared type

  `rel_type` = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords'
  `tagname` = 'pivotCacheRecords'
  `to_tree`()

openpyxl.pivot.table module

class `openpyxl.pivot.table.``AutoSortScope`(pivotArea=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `pivotArea`

    Values must be of type <class ‘openpyxl.pivot.table.PivotArea’>

class `openpyxl.pivot.table.``ChartFormat`(chart=None, format=None, series=None, pivotArea=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `chart`

    Values must be of type <class ‘int’>

  `format`

    Values must be of type <class ‘int’>

  `pivotArea`

    Values must be of type <class ‘openpyxl.pivot.table.PivotArea’>

  `series`

    Values must be of type <class ‘bool’>

  `tagname` = 'chartFormat'

class `openpyxl.pivot.table.``ColHierarchiesUsage`(count=None, colHierarchyUsage=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `colHierarchyUsage`

    A sequence (list or tuple) that may only contain objects of the declared type

  `count`
  `tagname` = 'colHierarchiesUsage'

class `openpyxl.pivot.table.``ConditionalFormat`(scope='selection', type=None, priority=None, pivotAreas=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `pivotAreas`

    Wrap a sequence in an containing object

  `priority`

    Values must be of type <class ‘int’>

  `scope`

    Value must be one of {‘field’, ‘selection’, ‘data’}

  `tagname` = 'conditionalFormat'
  `type`

    Value must be one of {‘column’, ‘row’, ‘all’}

class `openpyxl.pivot.table.``DataField`(name=None, fld=None, subtotal='sum', showDataAs='normal', baseField=-1, baseItem=1048832, numFmtId=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `baseField`

    Values must be of type <class ‘int’>

  `baseItem`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fld`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `numFmtId`

    Values must be of type <class ‘int’>

  `showDataAs`

    Value must be one of {‘percentOfCol’, ‘percentOfTotal’, ‘percentOfRow’, ‘percentDiff’, ‘difference’, ‘index’, ‘percent’, ‘runTotal’, ‘normal’}

  `subtotal`

    Value must be one of {‘countNums’, ‘average’, ‘product’, ‘stdDev’, ‘min’, ‘count’, ‘sum’, ‘var’, ‘stdDevp’, ‘varp’, ‘max’}

  `tagname` = 'dataField'

class `openpyxl.pivot.table.``FieldItem`(n=None, t='data', h=None, s=None, sd=True, f=None, m=None, c=None, x=None, d=None, e=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `c`

    Values must be of type <class ‘bool’>

  `d`

    Values must be of type <class ‘bool’>

  `e`

    Values must be of type <class ‘bool’>

  `f`

    Values must be of type <class ‘bool’>

  `h`

    Values must be of type <class ‘bool’>

  `m`

    Values must be of type <class ‘bool’>

  `n`

    Values must be of type <class ‘str’>

  `s`

    Values must be of type <class ‘bool’>

  `sd`

    Values must be of type <class ‘bool’>

  `t`

    Value must be one of {‘countA’, ‘product’, ‘stdDev’, ‘grand’, ‘min’, ‘count’, ‘sum’, ‘stdDevP’, ‘var’, ‘default’, ‘data’, ‘blank’, ‘varP’, ‘avg’, ‘max’}

  `tagname` = 'item'
  `x`

    Values must be of type <class ‘int’>

class `openpyxl.pivot.table.``Format`(action='formatting', dxfId=None, pivotArea=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `action`

    Value must be one of {‘drill’, ‘blank’, ‘formatting’, ‘formula’}

  `dxfId`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `pivotArea`

    Values must be of type <class ‘openpyxl.pivot.table.PivotArea’>

  `tagname` = 'format'

class `openpyxl.pivot.table.``HierarchyUsage`(hierarchyUsage=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `hierarchyUsage`

    Values must be of type <class ‘int’>

  `tagname` = 'hierarchyUsage'

class `openpyxl.pivot.table.``Location`(ref=None, firstHeaderRow=None, firstDataRow=None, firstDataCol=None, rowPageCount=None, colPageCount=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `colPageCount`

    Values must be of type <class ‘int’>

  `firstDataCol`

    Values must be of type <class ‘int’>

  `firstDataRow`

    Values must be of type <class ‘int’>

  `firstHeaderRow`

    Values must be of type <class ‘int’>

  `ref`

    Values must be of type <class ‘str’>

  `rowPageCount`

    Values must be of type <class ‘int’>

  `tagname` = 'location'

class `openpyxl.pivot.table.``MemberList`(count=None, level=None, member=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `level`

    Values must be of type <class ‘int’>

  `member`

    Wrap a sequence in an containing object

  `tagname` = 'members'

class `openpyxl.pivot.table.``MemberProperty`(name=None, showCell=None, showTip=None, showAsCaption=None, nameLen=None, pPos=None, pLen=None, level=None, field=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `field`

    Values must be of type <class ‘int’>

  `level`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `nameLen`

    Values must be of type <class ‘int’>

  `pLen`

    Values must be of type <class ‘int’>

  `pPos`

    Values must be of type <class ‘int’>

  `showAsCaption`

    Values must be of type <class ‘bool’>

  `showCell`

    Values must be of type <class ‘bool’>

  `showTip`

    Values must be of type <class ‘bool’>

  `tagname` = 'mps'

class `openpyxl.pivot.table.``PageField`(fld=None, item=None, hier=None, name=None, cap=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cap`

    Values must be of type <class ‘str’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fld`

    Values must be of type <class ‘int’>

  `hier`

    Values must be of type <class ‘int’>

  `item`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'pageField'

class `openpyxl.pivot.table.``PivotArea`(references=(), extLst=None, field=None, type='normal', dataOnly=True, labelOnly=None, grandRow=None, grandCol=None, cacheIndex=None, outline=True, offset=None, collapsedLevelsAreSubtotals=None, axis=None, fieldPosition=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `axis`

    Value must be one of {‘axisCol’, ‘axisValues’, ‘axisRow’, ‘axisPage’}

  `cacheIndex`

    Values must be of type <class ‘bool’>

  `collapsedLevelsAreSubtotals`

    Values must be of type <class ‘bool’>

  `dataOnly`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `field`

    Values must be of type <class ‘int’>

  `fieldPosition`

    Values must be of type <class ‘int’>

  `grandCol`

    Values must be of type <class ‘bool’>

  `grandRow`

    Values must be of type <class ‘bool’>

  `labelOnly`

    Values must be of type <class ‘bool’>

  `offset`

    Values must be of type <class ‘str’>

  `outline`

    Values must be of type <class ‘bool’>

  `references`

    Wrap a sequence in an containing object

  `tagname` = 'pivotArea'
  `type`

    Value must be one of {‘topEnd’, ‘all’, ‘data’, ‘topRight’, ‘origin’, ‘button’, ‘normal’}

class `openpyxl.pivot.table.``PivotField`(items=(), autoSortScope=None, name=None, axis=None, dataField=None, subtotalCaption=None, showDropDowns=True, hiddenLevel=None, uniqueMemberProperty=None, compact=True, allDrilled=None, numFmtId=None, outline=True, subtotalTop=True, dragToRow=True, dragToCol=True, multipleItemSelectionAllowed=None, dragToPage=True, dragToData=True, dragOff=True, showAll=True, insertBlankRow=None, serverField=None, insertPageBreak=None, autoShow=None, topAutoShow=True, hideNewItems=None, measureFilter=None, includeNewItemsInFilter=None, itemPageCount=10, sortType='manual', dataSourceSort=None, nonAutoSortDefault=None, rankBy=None, defaultSubtotal=True, sumSubtotal=None, countASubtotal=None, avgSubtotal=None, maxSubtotal=None, minSubtotal=None, productSubtotal=None, countSubtotal=None, stdDevSubtotal=None, stdDevPSubtotal=None, varSubtotal=None, varPSubtotal=None, showPropCell=None, showPropTip=None, showPropAsCaption=None, defaultAttributeDrillState=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `allDrilled`

    Values must be of type <class ‘bool’>

  `autoShow`

    Values must be of type <class ‘bool’>

  `autoSortScope`

    Values must be of type <class ‘openpyxl.pivot.table.AutoSortScope’>

  `avgSubtotal`

    Values must be of type <class ‘bool’>

  `axis`

    Value must be one of {‘axisCol’, ‘axisValues’, ‘axisRow’, ‘axisPage’}

  `compact`

    Values must be of type <class ‘bool’>

  `countASubtotal`

    Values must be of type <class ‘bool’>

  `countSubtotal`

    Values must be of type <class ‘bool’>

  `dataField`

    Values must be of type <class ‘bool’>

  `dataSourceSort`

    Values must be of type <class ‘bool’>

  `defaultAttributeDrillState`

    Values must be of type <class ‘bool’>

  `defaultSubtotal`

    Values must be of type <class ‘bool’>

  `dragOff`

    Values must be of type <class ‘bool’>

  `dragToCol`

    Values must be of type <class ‘bool’>

  `dragToData`

    Values must be of type <class ‘bool’>

  `dragToPage`

    Values must be of type <class ‘bool’>

  `dragToRow`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `hiddenLevel`

    Values must be of type <class ‘bool’>

  `hideNewItems`

    Values must be of type <class ‘bool’>

  `includeNewItemsInFilter`

    Values must be of type <class ‘bool’>

  `insertBlankRow`

    Values must be of type <class ‘bool’>

  `insertPageBreak`

    Values must be of type <class ‘bool’>

  `itemPageCount`

    Values must be of type <class ‘int’>

  `items`

    Wrap a sequence in an containing object

  `maxSubtotal`

    Values must be of type <class ‘bool’>

  `measureFilter`

    Values must be of type <class ‘bool’>

  `minSubtotal`

    Values must be of type <class ‘bool’>

  `multipleItemSelectionAllowed`

    Values must be of type <class ‘bool’>

  `name`

    Values must be of type <class ‘str’>

  `nonAutoSortDefault`

    Values must be of type <class ‘bool’>

  `numFmtId`

    Values must be of type <class ‘int’>

  `outline`

    Values must be of type <class ‘bool’>

  `productSubtotal`

    Values must be of type <class ‘bool’>

  `rankBy`

    Values must be of type <class ‘int’>

  `serverField`

    Values must be of type <class ‘bool’>

  `showAll`

    Values must be of type <class ‘bool’>

  `showDropDowns`

    Values must be of type <class ‘bool’>

  `showPropAsCaption`

    Values must be of type <class ‘bool’>

  `showPropCell`

    Values must be of type <class ‘bool’>

  `showPropTip`

    Values must be of type <class ‘bool’>

  `sortType`

    Value must be one of {‘manual’, ‘ascending’, ‘descending’}

  `stdDevPSubtotal`

    Values must be of type <class ‘bool’>

  `stdDevSubtotal`

    Values must be of type <class ‘bool’>

  `subtotalCaption`

    Values must be of type <class ‘str’>

  `subtotalTop`

    Values must be of type <class ‘bool’>

  `sumSubtotal`

    Values must be of type <class ‘bool’>

  `tagname` = 'pivotField'
  `topAutoShow`

    Values must be of type <class ‘bool’>

  `uniqueMemberProperty`

    Values must be of type <class ‘str’>

  `varPSubtotal`

    Values must be of type <class ‘bool’>

  `varSubtotal`

    Values must be of type <class ‘bool’>

class `openpyxl.pivot.table.``PivotFilter`(fld=None, mpFld=None, type=None, evalOrder=None, id=None, iMeasureHier=None, iMeasureFld=None, name=None, description=None, stringValue1=None, stringValue2=None, autoFilter=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoFilter`

    Values must be of type <class ‘openpyxl.worksheet.filters.AutoFilter’>

  `description`

    Values must be of type <class ‘str’>

  `evalOrder`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fld`

    Values must be of type <class ‘int’>

  `iMeasureFld`

    Values must be of type <class ‘int’>

  `iMeasureHier`

    Values must be of type <class ‘int’>

  `id`

    Values must be of type <class ‘int’>

  `mpFld`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `stringValue1`

    Values must be of type <class ‘str’>

  `stringValue2`

    Values must be of type <class ‘str’>

  `tagname` = 'filter'
  `type`

    Value must be one of {‘nextQuarter’, ‘dateNewerThan’, ‘valueGreaterThanOrEqual’, ‘valueBetween’, ‘sum’, ‘captionLessThan’, ‘dateOlderThanOrEqual’, ‘M10’, ‘M9’, ‘valueNotEqual’, ‘M6’, ‘thisMonth’, ‘nextYear’, ‘captionContains’, ‘nextMonth’, ‘yesterday’, ‘captionNotEndsWith’, ‘dateEqual’, ‘Q3’, ‘dateNotEqual’, ‘captionLessThanOrEqual’, ‘dateOlderThan’, ‘dateNotBetween’, ‘lastWeek’, ‘valueNotBetween’, ‘captionNotBeginsWith’, ‘Q4’, ‘captionNotContains’, ‘captionEndsWith’, ‘thisWeek’, ‘M7’, ‘yearToDate’, ‘captionGreaterThan’, ‘thisYear’, ‘M3’, ‘lastMonth’, ‘dateNewerThanOrEqual’, ‘nextWeek’, ‘captionEqual’, ‘captionNotBetween’, ‘lastYear’, ‘captionBeginsWith’, ‘M5’, ‘M8’, ‘M12’, ‘valueGreaterThan’, ‘M1’, ‘M11’, ‘captionBetween’, ‘captionNotEqual’, ‘lastQuarter’, ‘valueLessThanOrEqual’, ‘captionGreaterThanOrEqual’, ‘count’, ‘Q1’, ‘dateBetween’, ‘M2’, ‘Q2’, ‘unknown’, ‘M4’, ‘valueLessThan’, ‘thisQuarter’, ‘tomorrow’, ‘today’, ‘valueEqual’, ‘percent’}

class `openpyxl.pivot.table.``PivotFilters`(count=None, filter=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `filter`

    Values must be of type <class ‘openpyxl.pivot.table.PivotFilter’>

class `openpyxl.pivot.table.``PivotHierarchy`(outline=None, multipleItemSelectionAllowed=None, subtotalTop=None, showInFieldList=None, dragToRow=None, dragToCol=None, dragToPage=None, dragToData=None, dragOff=None, includeNewItemsInFilter=None, caption=None, mps=(), members=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caption`

    Values must be of type <class ‘str’>

  `dragOff`

    Values must be of type <class ‘bool’>

  `dragToCol`

    Values must be of type <class ‘bool’>

  `dragToData`

    Values must be of type <class ‘bool’>

  `dragToPage`

    Values must be of type <class ‘bool’>

  `dragToRow`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `includeNewItemsInFilter`

    Values must be of type <class ‘bool’>

  `members`

    Values must be of type <class ‘openpyxl.pivot.table.MemberList’>

  `mps`

    Wrap a sequence in an containing object

  `multipleItemSelectionAllowed`

    Values must be of type <class ‘bool’>

  `outline`

    Values must be of type <class ‘bool’>

  `showInFieldList`

    Values must be of type <class ‘bool’>

  `subtotalTop`

    Values must be of type <class ‘bool’>

  `tagname` = 'pivotHierarchy'

class `openpyxl.pivot.table.``PivotTableStyle`(name=None, showRowHeaders=None, showColHeaders=None, showRowStripes=None, showColStripes=None, showLastColumn=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `showColHeaders`

    Values must be of type <class ‘bool’>

  `showColStripes`

    Values must be of type <class ‘bool’>

  `showLastColumn`

    Values must be of type <class ‘bool’>

  `showRowHeaders`

    Values must be of type <class ‘bool’>

  `showRowStripes`

    Values must be of type <class ‘bool’>

  `tagname` = 'pivotTableStyleInfo'

class `openpyxl.pivot.table.``Reference`(field=None, count=None, selected=None, byPosition=None, relative=None, defaultSubtotal=None, sumSubtotal=None, countASubtotal=None, avgSubtotal=None, maxSubtotal=None, minSubtotal=None, productSubtotal=None, countSubtotal=None, stdDevSubtotal=None, stdDevPSubtotal=None, varSubtotal=None, varPSubtotal=None, x=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `avgSubtotal`

    Values must be of type <class ‘bool’>

  `byPosition`

    Values must be of type <class ‘bool’>

  `count`
  `countASubtotal`

    Values must be of type <class ‘bool’>

  `countSubtotal`

    Values must be of type <class ‘bool’>

  `defaultSubtotal`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `field`

    Values must be of type <class ‘int’>

  `maxSubtotal`

    Values must be of type <class ‘bool’>

  `minSubtotal`

    Values must be of type <class ‘bool’>

  `productSubtotal`

    Values must be of type <class ‘bool’>

  `relative`

    Values must be of type <class ‘bool’>

  `selected`

    Values must be of type <class ‘bool’>

  `stdDevPSubtotal`

    Values must be of type <class ‘bool’>

  `stdDevSubtotal`

    Values must be of type <class ‘bool’>

  `sumSubtotal`

    Values must be of type <class ‘bool’>

  `tagname` = 'reference'
  `varPSubtotal`

    Values must be of type <class ‘bool’>

  `varSubtotal`

    Values must be of type <class ‘bool’>

  `x`

    Values must be of type <class ‘int’>

class `openpyxl.pivot.table.``RowColField`(x=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tagname` = 'field'
  `x`

    Values must be of type <class ‘int’>

class `openpyxl.pivot.table.``RowColItem`(t='data', r=0, i=0, x=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `i`

    Values must be of type <class ‘int’>

  `r`

    Values must be of type <class ‘int’>

  `t`

    Value must be one of {‘countA’, ‘product’, ‘stdDev’, ‘grand’, ‘min’, ‘count’, ‘sum’, ‘stdDevP’, ‘var’, ‘default’, ‘data’, ‘blank’, ‘varP’, ‘avg’, ‘max’}

  `tagname` = 'i'
  `x`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.pivot.table.``RowHierarchiesUsage`(count=None, rowHierarchyUsage=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `rowHierarchyUsage`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'rowHierarchiesUsage'

class `openpyxl.pivot.table.``TableDefinition`(name=None, cacheId=None, dataOnRows=False, dataPosition=None, dataCaption=None, grandTotalCaption=None, errorCaption=None, showError=False, missingCaption=None, showMissing=True, pageStyle=None, pivotTableStyle=None, vacatedStyle=None, tag=None, updatedVersion=0, minRefreshableVersion=0, asteriskTotals=False, showItems=True, editData=False, disableFieldList=False, showCalcMbrs=True, visualTotals=True, showMultipleLabel=True, showDataDropDown=True, showDrill=True, printDrill=False, showMemberPropertyTips=True, showDataTips=True, enableWizard=True, enableDrill=True, enableFieldProperties=True, preserveFormatting=True, useAutoFormatting=False, pageWrap=0, pageOverThenDown=False, subtotalHiddenItems=False, rowGrandTotals=True, colGrandTotals=True, fieldPrintTitles=False, itemPrintTitles=False, mergeItem=False, showDropZones=True, createdVersion=0, indent=1, showEmptyRow=False, showEmptyCol=False, showHeaders=True, compact=True, outline=False, outlineData=False, compactData=True, published=False, gridDropZones=False, immersive=True, multipleFieldFilters=None, chartFormat=0, rowHeaderCaption=None, colHeaderCaption=None, fieldListSortAscending=None, mdxSubqueries=None, customListSort=None, autoFormatId=None, applyNumberFormats=False, applyBorderFormats=False, applyFontFormats=False, applyPatternFormats=False, applyAlignmentFormats=False, applyWidthHeightFormats=False, location=None, pivotFields=(), rowFields=(), rowItems=(), colFields=(), colItems=(), pageFields=(), dataFields=(), formats=(), conditionalFormats=(), chartFormats=(), pivotHierarchies=(), pivotTableStyleInfo=None, filters=(), rowHierarchiesUsage=None, colHierarchiesUsage=None, extLst=None, id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `applyAlignmentFormats`

    Values must be of type <class ‘bool’>

  `applyBorderFormats`

    Values must be of type <class ‘bool’>

  `applyFontFormats`

    Values must be of type <class ‘bool’>

  `applyNumberFormats`

    Values must be of type <class ‘bool’>

  `applyPatternFormats`

    Values must be of type <class ‘bool’>

  `applyWidthHeightFormats`

    Values must be of type <class ‘bool’>

  `asteriskTotals`

    Values must be of type <class ‘bool’>

  `autoFormatId`

    Values must be of type <class ‘int’>

  `cache` = None
  `cacheId`

    Values must be of type <class ‘int’>

  `chartFormat`

    Values must be of type <class ‘int’>

  `chartFormats`

    Wrap a sequence in an containing object

  `colFields`

    Wrap a sequence in an containing object

  `colGrandTotals`

    Values must be of type <class ‘bool’>

  `colHeaderCaption`

    Values must be of type <class ‘str’>

  `colHierarchiesUsage`

    Values must be of type <class ‘openpyxl.pivot.table.ColHierarchiesUsage’>

  `colItems`

    Wrap a sequence in an containing object

  `compact`

    Values must be of type <class ‘bool’>

  `compactData`

    Values must be of type <class ‘bool’>

  `conditionalFormats`

    Wrap a sequence in an containing object

  `createdVersion`

    Values must be of type <class ‘int’>

  `customListSort`

    Values must be of type <class ‘bool’>

  `dataCaption`

    Values must be of type <class ‘str’>

  `dataFields`

    Wrap a sequence in an containing object

  `dataOnRows`

    Values must be of type <class ‘bool’>

  `dataPosition`

    Values must be of type <class ‘int’>

  `disableFieldList`

    Values must be of type <class ‘bool’>

  `editData`

    Values must be of type <class ‘bool’>

  `enableDrill`

    Values must be of type <class ‘bool’>

  `enableFieldProperties`

    Values must be of type <class ‘bool’>

  `enableWizard`

    Values must be of type <class ‘bool’>

  `errorCaption`

    Values must be of type <class ‘str’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fieldListSortAscending`

    Values must be of type <class ‘bool’>

  `fieldPrintTitles`

    Values must be of type <class ‘bool’>

  `filters`

    Wrap a sequence in an containing object

  `formats`

    Wrap a sequence in an containing object

  `grandTotalCaption`

    Values must be of type <class ‘str’>

  `gridDropZones`

    Values must be of type <class ‘bool’>

  `id`

    Values must be of type <class ‘str’>

  `immersive`

    Values must be of type <class ‘bool’>

  `indent`

    Values must be of type <class ‘int’>

  `itemPrintTitles`

    Values must be of type <class ‘bool’>

  `location`

    Values must be of type <class ‘openpyxl.pivot.table.Location’>

  `mdxSubqueries`

    Values must be of type <class ‘bool’>

  `mergeItem`

    Values must be of type <class ‘bool’>

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml'
  `minRefreshableVersion`

    Values must be of type <class ‘int’>

  `missingCaption`

    Values must be of type <class ‘str’>

  `multipleFieldFilters`

    Values must be of type <class ‘bool’>

  `name`

    Values must be of type <class ‘str’>

  `outline`

    Values must be of type <class ‘bool’>

  `outlineData`

    Values must be of type <class ‘bool’>

  `pageFields`

    Wrap a sequence in an containing object

  `pageOverThenDown`

    Values must be of type <class ‘bool’>

  `pageStyle`

    Values must be of type <class ‘str’>

  `pageWrap`

    Values must be of type <class ‘int’>

  `path`
  `pivotFields`

    Wrap a sequence in an containing object

  `pivotHierarchies`

    Wrap a sequence in an containing object

  `pivotTableStyle`

    Values must be of type <class ‘str’>

  `pivotTableStyleInfo`

    Values must be of type <class ‘openpyxl.pivot.table.PivotTableStyle’>

  `preserveFormatting`

    Values must be of type <class ‘bool’>

  `printDrill`

    Values must be of type <class ‘bool’>

  `published`

    Values must be of type <class ‘bool’>

  `rel_type` = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable'
  `rowFields`

    Wrap a sequence in an containing object

  `rowGrandTotals`

    Values must be of type <class ‘bool’>

  `rowHeaderCaption`

    Values must be of type <class ‘str’>

  `rowHierarchiesUsage`

    Values must be of type <class ‘openpyxl.pivot.table.RowHierarchiesUsage’>

  `rowItems`

    Wrap a sequence in an containing object

  `showCalcMbrs`

    Values must be of type <class ‘bool’>

  `showDataDropDown`

    Values must be of type <class ‘bool’>

  `showDataTips`

    Values must be of type <class ‘bool’>

  `showDrill`

    Values must be of type <class ‘bool’>

  `showDropZones`

    Values must be of type <class ‘bool’>

  `showEmptyCol`

    Values must be of type <class ‘bool’>

  `showEmptyRow`

    Values must be of type <class ‘bool’>

  `showError`

    Values must be of type <class ‘bool’>

  `showHeaders`

    Values must be of type <class ‘bool’>

  `showItems`

    Values must be of type <class ‘bool’>

  `showMemberPropertyTips`

    Values must be of type <class ‘bool’>

  `showMissing`

    Values must be of type <class ‘bool’>

  `showMultipleLabel`

    Values must be of type <class ‘bool’>

  `subtotalHiddenItems`

    Values must be of type <class ‘bool’>

  `tag`

    Values must be of type <class ‘str’>

  `tagname` = 'pivotTableDefinition'
  `to_tree`()
  `updatedVersion`

    Values must be of type <class ‘int’>

  `useAutoFormatting`

    Values must be of type <class ‘bool’>

  `vacatedStyle`

    Values must be of type <class ‘str’>

  `visualTotals`

    Values must be of type <class ‘bool’>

###### openpyxl.reader package

Submodules
openpyxl.reader.drawings module

`openpyxl.reader.drawings.``find_images`(archive, path)

  Given the path to a drawing file extract charts and images

  Ingore errors due to unsupported parts of DrawingML

openpyxl.reader.excel module

Read an xlsx file into Python

class `openpyxl.reader.excel.``ExcelReader`(fn, read_only=False, keep_vba=False, data_only=False, keep_links=True)

  Bases: `object`

  Read an Excel package and dispatch the contents to the relevant modules

  `read`()
  `read_chartsheet`(sheet, rel)
  `read_manifest`()
  `read_properties`()
  `read_strings`()
  `read_theme`()
  `read_workbook`()
  `read_worksheets`()

`openpyxl.reader.excel.``load_workbook`(filename, read_only=False, keep_vba=False, data_only=False, keep_links=True)

  Open the given filename and return the workbook

  Parameters: | filename (string or a file-like object open in binary mode c.f., `zipfile.ZipFile`) – the path to open or a file-like object read_only (bool) – optimised for reading, content cannot be edited keep_vba (bool) – preseve vba content (this does NOT mean you can use it) data_only (bool) – controls whether cells with formulae have either the formula (default) or the value stored the last time Excel read the sheet keep_links (bool) – whether links to external workbooks should be preserved. The default is True
  Return type: | `openpyxl.workbook.Workbook`

  Note

  When using lazy load, all worksheets will be `openpyxl.worksheet.iter_worksheet.IterableWorksheet` and the returned workbook will be read-only.

openpyxl.reader.strings module

`openpyxl.reader.strings.``read_string_table`(xml_source)

  Read in all shared strings in the table

openpyxl.reader.workbook module

class `openpyxl.reader.workbook.``WorkbookParser`(archive, workbook_part_name, keep_links=True)

  Bases: `object`

  `assign_names`()

    Bind reserved names to parsed worksheets

  `find_sheets`()

    Find all sheets in the workbook and return the link to the source file.

    Older XLSM files sometimes contain invalid sheet elements. Warn user when these are removed.

  `parse`()
  `pivot_caches`

    Get PivotCache objects

  `rels`

###### openpyxl.styles package

Submodules
openpyxl.styles.alignment module

class `openpyxl.styles.alignment.``Alignment`(horizontal=None, vertical=None, textRotation=0, wrapText=None, shrinkToFit=None, indent=0, relativeIndent=0, justifyLastLine=None, readingOrder=0, text_rotation=None, wrap_text=None, shrink_to_fit=None, mergeCell=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Alignment options for use in styles.

  `horizontal`

    Value must be one of {‘left’, ‘fill’, ‘justify’, ‘distributed’, ‘centerContinuous’, ‘general’, ‘right’, ‘center’}

  `indent`

    Values must be of type <class ‘float’>

  `justifyLastLine`

    Values must be of type <class ‘bool’>

  `readingOrder`

    Values must be of type <class ‘float’>

  `relativeIndent`

    Values must be of type <class ‘float’>

  `shrinkToFit`

    Values must be of type <class ‘bool’>

  `shrink_to_fit`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'alignment'
  `textRotation`

    Value must be one of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180}

  `text_rotation`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `vertical`

    Value must be one of {‘justify’, ‘bottom’, ‘distributed’, ‘top’, ‘center’}

  `wrapText`

    Values must be of type <class ‘bool’>

  `wrap_text`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

openpyxl.styles.borders module

class `openpyxl.styles.borders.``Border`(left=None, right=None, top=None, bottom=None, diagonal=None, diagonal_direction=None, vertical=None, horizontal=None, diagonalUp=False, diagonalDown=False, outline=True, start=None, end=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Border positioning for use in styles.

  `bottom`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `diagonal`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `diagonalDown`

    Values must be of type <class ‘bool’>

  `diagonalUp`

    Values must be of type <class ‘bool’>

  `end`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `horizontal`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `left`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `outline`

    Values must be of type <class ‘bool’>

  `right`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `start`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `tagname` = 'border'
  `top`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

  `vertical`

    Values must be of type <class ‘openpyxl.styles.borders.Side’>

class `openpyxl.styles.borders.``Side`(style=None, color=None, border_style=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Border options for use in styles. Caution: if you do not specify a border_style, other attributes will have no effect !

  `border_style`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `color`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `style`

    Value must be one of {‘thick’, ‘mediumDashDot’, ‘mediumDashed’, ‘hair’, ‘double’, ‘dashDot’, ‘dotted’, ‘slantDashDot’, ‘dashed’, ‘mediumDashDotDot’, ‘thin’, ‘dashDotDot’, ‘medium’}

openpyxl.styles.builtins module
openpyxl.styles.cell_style module

class `openpyxl.styles.cell_style.``ArrayDescriptor`(key)

  Bases: `object`

class `openpyxl.styles.cell_style.``CellStyle`(numFmtId=0, fontId=0, fillId=0, borderId=0, xfId=None, quotePrefix=None, pivotButton=None, applyNumberFormat=None, applyFont=None, applyFill=None, applyBorder=None, applyAlignment=None, applyProtection=None, alignment=None, protection=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alignment`

    Values must be of type <class ‘openpyxl.styles.alignment.Alignment’>

  `applyAlignment`
  `applyBorder`

    Values must be of type <class ‘bool’>

  `applyFill`

    Values must be of type <class ‘bool’>

  `applyFont`

    Values must be of type <class ‘bool’>

  `applyNumberFormat`

    Values must be of type <class ‘bool’>

  `applyProtection`
  `borderId`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fillId`

    Values must be of type <class ‘int’>

  `fontId`

    Values must be of type <class ‘int’>

  classmethod `from_array`(style)

    Convert from StyleArray

  `numFmtId`

    Values must be of type <class ‘int’>

  `pivotButton`

    Values must be of type <class ‘bool’>

  `protection`

    Values must be of type <class ‘openpyxl.styles.protection.Protection’>

  `quotePrefix`

    Values must be of type <class ‘bool’>

  `tagname` = 'xf'
  `to_array`()

    Convert to StyleArray

  `xfId`

    Values must be of type <class ‘int’>

class `openpyxl.styles.cell_style.``CellStyleList`(count=None, xf=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alignment`

    A sequence (list or tuple) that may only contain objects of the declared type

  `count`
  `protection`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'cellXfs'
  `xf`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.styles.cell_style.``StyleArray`

  Bases: `array.array`

  Simplified named tuple with an array

  `alignmentId`
  `borderId`
  `fillId`
  `fontId`
  `numFmtId`
  `pivotButton`
  `protectionId`
  `quotePrefix`
  `tagname` = 'xf'
  `xfId`

openpyxl.styles.colors module

class `openpyxl.styles.colors.``Color`(rgb='00000000', indexed=None, auto=None, theme=None, tint=0.0, index=None, type='rgb')

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Named colors for use in styles.

  `auto`

    Values must be of type <class ‘bool’>

  `index`
  `indexed`

    Values must be of type <class ‘int’>

  `rgb`

    Values must be of type <class ‘str’>

  `tagname` = 'color'
  `theme`

    Values must be of type <class ‘int’>

  `tint`

    Values must be of type <class ‘float’>

  `type`

    Values must be of type <class ‘str’>

  `value`

class `openpyxl.styles.colors.``ColorDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  `expected_type`

    alias of `Color`

class `openpyxl.styles.colors.``ColorList`(indexedColors=(), mruColors=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `index`
  `indexedColors`

    Wrap a sequence in an containing object

  `mruColors`

    Wrap a sequence in an containing object

  `tagname` = 'colors'

class `openpyxl.styles.colors.``RGB`(*args, **kw)

  Bases: `openpyxl.descriptors.base.Typed`

  Descriptor for aRGB values If not supplied alpha is 00

  `expected_type`

    alias of `builtins.str`

class `openpyxl.styles.colors.``RgbColor`(rgb=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `rgb`

    Values must be of type <class ‘str’>

  `tagname` = 'rgbColor'

openpyxl.styles.differential module

class `openpyxl.styles.differential.``DifferentialStyle`(font=None, numFmt=None, fill=None, alignment=None, border=None, protection=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alignment`

    Values must be of type <class ‘openpyxl.styles.alignment.Alignment’>

  `border`

    Values must be of type <class ‘openpyxl.styles.borders.Border’>

  `fill`

    Values must be of type <class ‘openpyxl.styles.fills.Fill’>

  `font`

    Values must be of type <class ‘openpyxl.styles.fonts.Font’>

  `numFmt`

    Values must be of type <class ‘openpyxl.styles.numbers.NumberFormat’>

  `protection`

    Values must be of type <class ‘openpyxl.styles.protection.Protection’>

  `tagname` = 'dxf'

class `openpyxl.styles.differential.``DifferentialStyleList`(dxf=(), count=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Dedupable container for differential styles.

  `add`(dxf)

    Add a differential style and return its index

  `append`(dxf)

    Check to see whether style already exists and append it if does not.

  `count`
  `dxf`

    A sequence (list or tuple) that may only contain objects of the declared type

  `styles`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'dxfs'

openpyxl.styles.fills module

class `openpyxl.styles.fills.``Fill`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Base class

  classmethod `from_tree`(el)

    Create object from XML

  `tagname` = 'fill'

class `openpyxl.styles.fills.``GradientFill`(type='linear', degree=0, left=0, right=0, top=0, bottom=0, stop=())

  Bases: `openpyxl.styles.fills.Fill`

  Fill areas with gradient

  Two types of gradient fill are supported:

  > - A type=’linear’ gradient interpolates colours between a set of specified Stops, across the length of an area. The gradient is left-to-right by default, but this orientation can be modified with the degree attribute. A list of Colors can be provided instead and they will be positioned with equal distance between them.
  > - A type=’path’ gradient applies a linear gradient from each edge of the area. Attributes top, right, bottom, left specify the extent of fill from the respective borders. Thus top=”0.2” will fill the top 20% of the cell.

  `bottom`

    Values must be of type <class ‘float’>

  `degree`

    Values must be of type <class ‘float’>

  `fill_type`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `left`

    Values must be of type <class ‘float’>

  `right`

    Values must be of type <class ‘float’>

  `stop`
  `tagname` = 'gradientFill'
  `to_tree`(tagname=None, namespace=None, idx=None)
  `top`

    Values must be of type <class ‘float’>

  `type`

    Value must be one of {‘linear’, ‘path’}

class `openpyxl.styles.fills.``PatternFill`(patternType=None, fgColor=<openpyxl.styles.colors.Color object> Parameters: rgb='00000000', indexed=None, auto=None, theme=None, tint=0.0, type='rgb', bgColor=<openpyxl.styles.colors.Color object> Parameters: rgb='00000000', indexed=None, auto=None, theme=None, tint=0.0, type='rgb', fill_type=None, start_color=None, end_color=None)

  Bases: `openpyxl.styles.fills.Fill`

  Area fill patterns for use in styles. Caution: if you do not specify a fill_type, other attributes will have no effect !

  `bgColor`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `end_color`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `fgColor`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `fill_type`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `patternType`

    Value must be one of {‘darkTrellis’, ‘lightGray’, ‘darkHorizontal’, ‘lightHorizontal’, ‘lightTrellis’, ‘lightUp’, ‘lightVertical’, ‘darkDown’, ‘lightDown’, ‘darkGrid’, ‘lightGrid’, ‘gray125’, ‘darkGray’, ‘mediumGray’, ‘solid’, ‘darkVertical’, ‘darkUp’, ‘gray0625’}

  `start_color`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `tagname` = 'patternFill'
  `to_tree`(tagname=None, idx=None)

class `openpyxl.styles.fills.``Stop`(color, position)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `color`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `position`

    Values must be of type <class ‘float’>

  `tagname` = 'stop'

class `openpyxl.styles.fills.``StopList`(name=None, **kw)

  Bases: `openpyxl.descriptors.sequence.Sequence`

  `expected_type`

    alias of `Stop`

openpyxl.styles.fonts module

class `openpyxl.styles.fonts.``Font`(name=None, sz=None, b=None, i=None, charset=None, u=None, strike=None, color=None, scheme=None, family=None, size=None, bold=None, italic=None, strikethrough=None, underline=None, vertAlign=None, outline=None, shadow=None, condense=None, extend=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Font options used in styles.

  `UNDERLINE_DOUBLE` = 'double'
  `UNDERLINE_DOUBLE_ACCOUNTING` = 'doubleAccounting'
  `UNDERLINE_SINGLE` = 'single'
  `UNDERLINE_SINGLE_ACCOUNTING` = 'singleAccounting'
  `b`

    Values must be of type <class ‘bool’>

  `bold`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `charset`

    Values must be of type <class ‘int’>

  `color`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `condense`

    Values must be of type <class ‘bool’>

  `extend`

    Values must be of type <class ‘bool’>

  `family`

    Values must be of type <class ‘float’>

  classmethod `from_tree`(node)

    Set default value for underline if child element is present

  `i`

    Values must be of type <class ‘bool’>

  `italic`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `name`

    Values must be of type <class ‘str’>

  `outline`

    Values must be of type <class ‘bool’>

  `scheme`

    Value must be one of {‘minor’, ‘major’}

  `shadow`

    Values must be of type <class ‘bool’>

  `size`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `strike`

    Values must be of type <class ‘bool’>

  `strikethrough`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `sz`

    Values must be of type <class ‘float’>

  `tagname` = 'font'
  `u`

    Value must be one of {‘double’, ‘singleAccounting’, ‘doubleAccounting’, ‘single’}

  `underline`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `vertAlign`

    Value must be one of {‘subscript’, ‘baseline’, ‘superscript’}

openpyxl.styles.named_styles module

class `openpyxl.styles.named_styles.``NamedStyle`(name='Normal', font=<openpyxl.styles.fonts.Font object> Parameters: name=None, charset=None, family=None, b=False, i=False, strike=None, outline=None, shadow=None, condense=None, color=None, extend=None, sz=None, u=None, vertAlign=None, scheme=None, fill=<openpyxl.styles.fills.PatternFill object> Parameters: patternType=None, fgColor=<openpyxl.styles.colors.Color object> Parameters: rgb='00000000', indexed=None, auto=None, theme=None, tint=0.0, type='rgb', bgColor=<openpyxl.styles.colors.Color object> Parameters: rgb='00000000', indexed=None, auto=None, theme=None, tint=0.0, type='rgb', border=<openpyxl.styles.borders.Border object> Parameters: outline=True, diagonalUp=False, diagonalDown=False, start=None, end=None, left=None, right=None, top=None, bottom=None, diagonal=None, vertical=None, horizontal=None, alignment=<openpyxl.styles.alignment.Alignment object> Parameters: horizontal=None, vertical=None, textRotation=0, wrapText=None, shrinkToFit=None, indent=0.0, relativeIndent=0.0, justifyLastLine=None, readingOrder=0.0, number_format=None, protection=<openpyxl.styles.protection.Protection object> Parameters: locked=True, hidden=False, builtinId=None, hidden=False, xfId=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Named and editable styles

  `alignment`

    Values must be of type <class ‘openpyxl.styles.alignment.Alignment’>

  `as_name`()

    Return relevant named style

  `as_tuple`()

    Return a style array representing the current style

  `as_xf`()

    Return equivalent XfStyle

  `bind`(wb)

    Bind a named style to a workbook

  `border`

    Values must be of type <class ‘openpyxl.styles.borders.Border’>

  `builtinId`

    Values must be of type <class ‘int’>

  `fill`

    Values must be of type <class ‘openpyxl.styles.fills.Fill’>

  `font`

    Values must be of type <class ‘openpyxl.styles.fonts.Font’>

  `hidden`

    Values must be of type <class ‘bool’>

  `name`

    Values must be of type <class ‘str’>

  `number_format`

    Values must be of type <class ‘str’>

  `protection`

    Values must be of type <class ‘openpyxl.styles.protection.Protection’>

  `xfId`

    Index of the style in the list of named styles

class `openpyxl.styles.named_styles.``NamedStyleList`

  Bases: `list`

  Named styles are editable and can be applied to multiple objects

  As only the index is stored in referencing objects the order mus be preserved.

  `append`(style)

    Append object to the end of the list.

  `names`

openpyxl.styles.numbers module

class `openpyxl.styles.numbers.``NumberFormat`(numFmtId=None, formatCode=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `formatCode`

    Values must be of type <class ‘str’>

  `numFmtId`

    Values must be of type <class ‘int’>

class `openpyxl.styles.numbers.``NumberFormatDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.base.String`

class `openpyxl.styles.numbers.``NumberFormatList`(count=None, numFmt=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `numFmt`

    A sequence (list or tuple) that may only contain objects of the declared type

`openpyxl.styles.numbers.``builtin_format_code`(index)

  Return one of the standard format codes by index.

`openpyxl.styles.numbers.``builtin_format_id`(fmt)

  Return the id of a standard style.

`openpyxl.styles.numbers.``is_builtin`(fmt)

`openpyxl.styles.numbers.``is_date_format`(fmt)

`openpyxl.styles.numbers.``is_datetime`(fmt)

  Return date, time or datetime

`openpyxl.styles.numbers.``is_timedelta_format`(fmt)

openpyxl.styles.protection module

class `openpyxl.styles.protection.``Protection`(locked=True, hidden=False)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Protection options for use in styles.

  `hidden`

    Values must be of type <class ‘bool’>

  `locked`

    Values must be of type <class ‘bool’>

  `tagname` = 'protection'

openpyxl.styles.proxy module

class `openpyxl.styles.proxy.``StyleProxy`(target)

  Bases: `object`

  Proxy formatting objects so that they cannot be altered

  `copy`(**kw)

    Return a copy of the proxied object. Keyword args will be passed through

    Note

    Deprecated: Use copy(obj) or cell.obj = cell.obj + other

openpyxl.styles.styleable module

class `openpyxl.styles.styleable.``NamedStyleDescriptor`

  Bases: `object`

  `collection` = '_named_styles'
  `key` = 'xfId'

class `openpyxl.styles.styleable.``NumberFormatDescriptor`

  Bases: `object`

  `collection` = '_number_formats'
  `key` = 'numFmtId'

class `openpyxl.styles.styleable.``StyleArrayDescriptor`(key)

  Bases: `object`

class `openpyxl.styles.styleable.``StyleDescriptor`(collection, key)

  Bases: `object`

class `openpyxl.styles.styleable.``StyleableObject`(sheet, style_array=None)

  Bases: `object`

  Base class for styleble objects implementing proxy and lookup functions

  `alignment`
  `border`
  `fill`
  `font`
  `has_style`
  `number_format`
  `parent`
  `pivotButton`
  `protection`
  `quotePrefix`
  `style`
  `style_id`

openpyxl.styles.stylesheet module

class `openpyxl.styles.stylesheet.``Stylesheet`(numFmts=None, fonts=(), fills=(), borders=(), cellStyleXfs=None, cellXfs=None, cellStyles=None, dxfs=(), tableStyles=None, colors=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `borders`

    Wrap a sequence in an containing object

  `cellStyleXfs`

    Values must be of type <class ‘openpyxl.styles.cell_style.CellStyleList’>

  `cellStyles`

    Values must be of type <class ‘openpyxl.styles.named_styles._NamedCellStyleList’>

  `cellXfs`

    Values must be of type <class ‘openpyxl.styles.cell_style.CellStyleList’>

  `colors`

    Values must be of type <class ‘openpyxl.styles.colors.ColorList’>

  `custom_formats`
  `dxfs`

    Wrap a sequence in an containing object

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `fills`

    Wrap a sequence in an containing object

  `fonts`

    Wrap a sequence in an containing object

  classmethod `from_tree`(node)

    Create object from XML

  `numFmts`

    Values must be of type <class ‘openpyxl.styles.numbers.NumberFormatList’>

  `tableStyles`

    Values must be of type <class ‘openpyxl.styles.table.TableStyleList’>

  `tagname` = 'styleSheet'
  `to_tree`(tagname=None, idx=None, namespace=None)

`openpyxl.styles.stylesheet.``apply_stylesheet`(archive, wb)

  Add styles to workbook if present

`openpyxl.styles.stylesheet.``write_stylesheet`(wb)

openpyxl.styles.table module

class `openpyxl.styles.table.``TableStyle`(name=None, pivot=None, table=None, count=None, tableStyleElement=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `pivot`

    Values must be of type <class ‘bool’>

  `table`

    Values must be of type <class ‘bool’>

  `tableStyleElement`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'tableStyle'

class `openpyxl.styles.table.``TableStyleElement`(type=None, size=None, dxfId=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `dxfId`

    Values must be of type <class ‘int’>

  `size`

    Values must be of type <class ‘int’>

  `tagname` = 'tableStyleElement'
  `type`

    Value must be one of {‘firstTotalCell’, ‘firstRowStripe’, ‘secondRowSubheading’, ‘secondRowStripe’, ‘firstRowSubheading’, ‘pageFieldValues’, ‘firstSubtotalColumn’, ‘blankRow’, ‘totalRow’, ‘firstColumn’, ‘secondSubtotalRow’, ‘thirdColumnSubheading’, ‘lastColumn’, ‘firstHeaderCell’, ‘firstSubtotalRow’, ‘lastTotalCell’, ‘secondColumnStripe’, ‘secondColumnSubheading’, ‘headerRow’, ‘thirdRowSubheading’, ‘lastHeaderCell’, ‘firstColumnSubheading’, ‘thirdSubtotalColumn’, ‘thirdSubtotalRow’, ‘firstColumnStripe’, ‘wholeTable’, ‘secondSubtotalColumn’, ‘pageFieldLabels’}

class `openpyxl.styles.table.``TableStyleList`(count=None, defaultTableStyle='TableStyleMedium9', defaultPivotStyle='PivotStyleLight16', tableStyle=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `defaultPivotStyle`

    Values must be of type <class ‘str’>

  `defaultTableStyle`

    Values must be of type <class ‘str’>

  `tableStyle`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'tableStyles'

###### openpyxl.utils package

Submodules
openpyxl.utils.bound_dictionary module

class `openpyxl.utils.bound_dictionary.``BoundDictionary`(reference=None, *args, **kw)

  Bases: `collections.defaultdict`

  A default dictionary where elements are tightly coupled.

  The factory method is responsible for binding the parent object to the child.

  If a reference attribute is assigned then child objects will have the key assigned to this.

  Otherwise it’s just a defaultdict.

openpyxl.utils.cell module

Collection of utilities used within the package and also available for client code

`openpyxl.utils.cell.``absolute_coordinate`(coord_string)

  Convert a coordinate to an absolute coordinate string (B12 -> $B$12)

`openpyxl.utils.cell.``cols_from_range`(range_string)

  Get individual addresses for every cell in a range. Yields one row at a time.

`openpyxl.utils.cell.``column_index_from_string`(str_col)

  Convert a column name into a numerical index (‘A’ -> 1)

`openpyxl.utils.cell.``coordinate_from_string`(coord_string)

  Convert a coordinate string like ‘B12’ to a tuple (‘B’, 12)

`openpyxl.utils.cell.``coordinate_to_tuple`(coordinate)

  Convert an Excel style coordinate to (row, colum) tuple

`openpyxl.utils.cell.``get_column_interval`(start, end)

  Given the start and end columns, return all the columns in the series.

  The start and end columns can be either column letters or 1-based indexes.

`openpyxl.utils.cell.``get_column_letter`(idx)

  Convert a column index into a column letter (3 -> ‘C’)

`openpyxl.utils.cell.``quote_sheetname`(sheetname)

  Add quotes around sheetnames if they contain spaces.

`openpyxl.utils.cell.``range_boundaries`(range_string)

  Convert a range string into a tuple of boundaries: (min_col, min_row, max_col, max_row) Cell coordinates will be converted into a range with the cell at both end

`openpyxl.utils.cell.``range_to_tuple`(range_string)

  Convert a worksheet range to the sheetname and maximum and minimum coordinate indices

`openpyxl.utils.cell.``rows_from_range`(range_string)

  Get individual addresses for every cell in a range. Yields one row at a time.

openpyxl.utils.dataframe module

`openpyxl.utils.dataframe.``dataframe_to_rows`(df, index=True, header=True)

  Convert a Pandas dataframe into something suitable for passing into a worksheet. If index is True then the index will be included, starting one row below the header. If header is True then column headers will be included starting one column to the right. Formatting should be done by client code.

`openpyxl.utils.dataframe.``expand_index`(index, header=False)

  Expand axis or column Multiindex For columns use header = True For axes use header = False (default)

openpyxl.utils.datetime module

Manage Excel date weirdness.

`openpyxl.utils.datetime.``days_to_time`(value)

`openpyxl.utils.datetime.``from_ISO8601`(formatted_string)

  Convert from a timestamp string to a datetime object. According to 18.17.4 in the specification the following ISO 8601 formats are supported.

  Dates B.1.1 and B.2.1 Times B.1.2 and B.2.2 Datetimes B.1.3 and B.2.3

  There is no concept of timedeltas in the specification, but Excel writes them (in strict OOXML mode), so these are also understood.

`openpyxl.utils.datetime.``from_excel`(value, epoch=datetime.datetime(1899, 12, 30, 0, 0), timedelta=False)

  Convert Excel serial to Python datetime

`openpyxl.utils.datetime.``time_to_days`(value)

  Convert a time value to fractions of day

`openpyxl.utils.datetime.``timedelta_to_days`(value)

  Convert a timedelta value to fractions of a day

`openpyxl.utils.datetime.``to_ISO8601`(dt)

  Convert from a datetime to a timestamp string.

`openpyxl.utils.datetime.``to_excel`(dt, epoch=datetime.datetime(1899, 12, 30, 0, 0))

  Convert Python datetime to Excel serial

openpyxl.utils.escape module

OOXML has non-standard escaping for characters <

`openpyxl.utils.escape.``escape`(value)

  Convert ASCII < 31 to OOXML: n == _x + hex(ord(n)) + _

`openpyxl.utils.escape.``unescape`(value)

  Convert escaped strings to ASCIII: _x000a_ == n

openpyxl.utils.exceptions module

Definitions for openpyxl shared exception classes.

exception `openpyxl.utils.exceptions.``CellCoordinatesException`

  Bases: `Exception`

  Error for converting between numeric and A1-style cell references.

exception `openpyxl.utils.exceptions.``IllegalCharacterError`

  Bases: `Exception`

  The data submitted which cannot be used directly in Excel files. It must be removed or escaped.

exception `openpyxl.utils.exceptions.``InvalidFileException`

  Bases: `Exception`

  Error for trying to open a non-ooxml file.

exception `openpyxl.utils.exceptions.``NamedRangeException`

  Bases: `Exception`

  Error for badly formatted named ranges.

exception `openpyxl.utils.exceptions.``ReadOnlyWorkbookException`

  Bases: `Exception`

  Error for trying to modify a read-only workbook

exception `openpyxl.utils.exceptions.``SheetTitleException`

  Bases: `Exception`

  Error for bad sheet names.

exception `openpyxl.utils.exceptions.``WorkbookAlreadySaved`

  Bases: `Exception`

  Error when attempting to perform operations on a dump workbook while it has already been dumped once

openpyxl.utils.indexed_list module

class `openpyxl.utils.indexed_list.``IndexedList`(iterable=None)

  Bases: `list`

  List with optimised access by value Based on Alex Martelli’s recipe

  http://code.activestate.com/recipes/52303-the-auxiliary-dictionary-idiom-for-sequences-with-/

  `add`(value)
  `append`(value)

    Append object to the end of the list.

  `index`(value)

    Return first index of value.

    Raises ValueError if the value is not present.

openpyxl.utils.inference module

Type inference functions

`openpyxl.utils.inference.``cast_numeric`(value)

  Explicity convert a string to a numeric value

`openpyxl.utils.inference.``cast_percentage`(value)

  Explicitly convert a string to numeric value and format as a percentage

`openpyxl.utils.inference.``cast_time`(value)

  Explicitly convert a string to a number and format as datetime or time

openpyxl.utils.protection module

`openpyxl.utils.protection.``hash_password`(plaintext_password='')

  Create a password hash from a given string for protecting a worksheet only. This will not work for encrypting a workbook.

  This method is based on the algorithm provided by Daniel Rentz of OpenOffice and the PEAR package Spreadsheet_Excel_Writer by Xavier Noguer <xnoguer@rezebra.com>. See also http://blogs.msdn.com/b/ericwhite/archive/2008/02/23/the-legacy-hashing-algorithm-in-open-xml.aspx

openpyxl.utils.units module

`openpyxl.utils.units.``DEFAULT_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 integert units of 1/60000th of a degree.

`openpyxl.utils.units.``EMU_to_cm`(value)

`openpyxl.utils.units.``EMU_to_inch`(value)

`openpyxl.utils.units.``EMU_to_pixels`(value)

`openpyxl.utils.units.``angle_to_degrees`(value)

`openpyxl.utils.units.``cm_to_EMU`(value)

  1 cm = 360000 EMUs

`openpyxl.utils.units.``cm_to_dxa`(value)

`openpyxl.utils.units.``degrees_to_angle`(value)

  1 degree = 60000 angles

`openpyxl.utils.units.``dxa_to_cm`(value)

`openpyxl.utils.units.``dxa_to_inch`(value)

`openpyxl.utils.units.``inch_to_EMU`(value)

  1 inch = 914400 EMUs

`openpyxl.utils.units.``inch_to_dxa`(value)

  1 inch = 72 * 20 dxa

`openpyxl.utils.units.``pixels_to_EMU`(value)

  1 pixel = 9525 EMUs

`openpyxl.utils.units.``pixels_to_points`(value, dpi=96)

  96 dpi, 72i

`openpyxl.utils.units.``points_to_pixels`(value, dpi=96)

`openpyxl.utils.units.``short_color`(color)

  format a color to its short size

###### openpyxl.workbook package

Subpackages
openpyxl.workbook.external_link package
Submodules
openpyxl.workbook.external_link.external module

class `openpyxl.workbook.external_link.external.``ExternalBook`(sheetNames=None, definedNames=(), sheetDataSet=None, id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `definedNames`

    Wrap a sequence in an containing object

  `id`

    Values must be of type <class ‘str’>

  `sheetDataSet`

    Values must be of type <class ‘openpyxl.workbook.external_link.external.ExternalSheetDataSet’>

  `sheetNames`

    Values must be of type <class ‘openpyxl.workbook.external_link.external.ExternalSheetNames’>

  `tagname` = 'externalBook'

class `openpyxl.workbook.external_link.external.``ExternalCell`(r=None, t=None, vm=None, v=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `r`

    Values must be of type <class ‘str’>

  `t`

    Value must be one of {‘e’, ‘s’, ‘d’, ‘b’, ‘str’, ‘inlineStr’, ‘n’}

  `v`

    Values must be of type <class ‘str’>

  `vm`

    Values must be of type <class ‘int’>

class `openpyxl.workbook.external_link.external.``ExternalDefinedName`(name=None, refersTo=None, sheetId=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `refersTo`

    Values must be of type <class ‘str’>

  `sheetId`

    Values must be of type <class ‘int’>

  `tagname` = 'definedName'

class `openpyxl.workbook.external_link.external.``ExternalLink`(externalBook=None, ddeLink=None, oleLink=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `externalBook`

    Values must be of type <class ‘openpyxl.workbook.external_link.external.ExternalBook’>

  `file_link`

    Values must be of type <class ‘openpyxl.packaging.relationship.Relationship’>

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml'
  `path`
  `tagname` = 'externalLink'
  `to_tree`()

class `openpyxl.workbook.external_link.external.``ExternalRow`(r=(), cell=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cell`

    A sequence (list or tuple) that may only contain objects of the declared type

  `r`

    Values must be of type <class ‘int’>

class `openpyxl.workbook.external_link.external.``ExternalSheetData`(sheetId=None, refreshError=None, row=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `refreshError`

    Values must be of type <class ‘bool’>

  `row`

    A sequence (list or tuple) that may only contain objects of the declared type

  `sheetId`

    Values must be of type <class ‘int’>

class `openpyxl.workbook.external_link.external.``ExternalSheetDataSet`(sheetData=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `sheetData`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.workbook.external_link.external.``ExternalSheetNames`(sheetName=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `sheetName`

    A sequence of primitive types that are stored as a single attribute. “val” is the default attribute

`openpyxl.workbook.external_link.external.``read_external_link`(archive, book_path)

Submodules
openpyxl.workbook.child module

`openpyxl.workbook.child.``avoid_duplicate_name`(names, value)

  Naive check to see whether name already exists. If name does exist suggest a name using an incrementer Duplicates are case insensitive

openpyxl.workbook.defined_name module

class `openpyxl.workbook.defined_name.``DefinedName`(name=None, comment=None, customMenu=None, description=None, help=None, statusBar=None, localSheetId=None, hidden=None, function=None, vbProcedure=None, xlm=None, functionGroupId=None, shortcutKey=None, publishToServer=None, workbookParameter=None, attr_text=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `attr_text`
  `comment`

    Values must be of type <class ‘str’>

  `customMenu`

    Values must be of type <class ‘str’>

  `description`

    Values must be of type <class ‘str’>

  `destinations`
  `function`

    Values must be of type <class ‘bool’>

  `functionGroupId`

    Values must be of type <class ‘int’>

  `help`

    Values must be of type <class ‘str’>

  `hidden`

    Values must be of type <class ‘bool’>

  `is_external`
  `is_reserved`
  `localSheetId`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `publishToServer`

    Values must be of type <class ‘bool’>

  `shortcutKey`

    Values must be of type <class ‘str’>

  `statusBar`

    Values must be of type <class ‘str’>

  `tagname` = 'definedName'
  `type`
  `value`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `vbProcedure`

    Values must be of type <class ‘bool’>

  `workbookParameter`

    Values must be of type <class ‘bool’>

  `xlm`

    Values must be of type <class ‘bool’>

class `openpyxl.workbook.defined_name.``DefinedNameList`(definedName=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `append`(defn)
  `definedName`

    A sequence (list or tuple) that may only contain objects of the declared type

  `delete`(name, scope=None)

    Delete a name assigned to a specific or global

  `get`(name, scope=None)

    Get the name assigned to a specicic sheet or global

  `localnames`(scope)

    Provide a list of all names for a particular worksheet

  `tagname` = 'definedNames'

openpyxl.workbook.external_reference module

class `openpyxl.workbook.external_reference.``ExternalReference`(id)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘str’>

  `tagname` = 'externalReference'

openpyxl.workbook.function_group module

class `openpyxl.workbook.function_group.``FunctionGroup`(name=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'functionGroup'

class `openpyxl.workbook.function_group.``FunctionGroupList`(builtInGroupCount=16, functionGroup=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `builtInGroupCount`

    Values must be of type <class ‘int’>

  `functionGroup`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'functionGroups'

openpyxl.workbook.properties module

class `openpyxl.workbook.properties.``CalcProperties`(calcId=124519, calcMode=None, fullCalcOnLoad=True, refMode=None, iterate=None, iterateCount=None, iterateDelta=None, fullPrecision=None, calcCompleted=None, calcOnSave=None, concurrentCalc=None, concurrentManualCount=None, forceFullCalc=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `calcCompleted`

    Values must be of type <class ‘bool’>

  `calcId`

    Values must be of type <class ‘int’>

  `calcMode`

    Value must be one of {‘autoNoTable’, ‘manual’, ‘auto’}

  `calcOnSave`

    Values must be of type <class ‘bool’>

  `concurrentCalc`

    Values must be of type <class ‘bool’>

  `concurrentManualCount`

    Values must be of type <class ‘int’>

  `forceFullCalc`

    Values must be of type <class ‘bool’>

  `fullCalcOnLoad`

    Values must be of type <class ‘bool’>

  `fullPrecision`

    Values must be of type <class ‘bool’>

  `iterate`

    Values must be of type <class ‘bool’>

  `iterateCount`

    Values must be of type <class ‘int’>

  `iterateDelta`

    Values must be of type <class ‘float’>

  `refMode`

    Value must be one of {‘A1’, ‘R1C1’}

  `tagname` = 'calcPr'

class `openpyxl.workbook.properties.``FileVersion`(appName=None, lastEdited=None, lowestEdited=None, rupBuild=None, codeName=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `appName`

    Values must be of type <class ‘str’>

  `codeName`
  `lastEdited`

    Values must be of type <class ‘str’>

  `lowestEdited`

    Values must be of type <class ‘str’>

  `rupBuild`

    Values must be of type <class ‘str’>

  `tagname` = 'fileVersion'

class `openpyxl.workbook.properties.``WorkbookProperties`(date1904=None, dateCompatibility=None, showObjects=None, showBorderUnselectedTables=None, filterPrivacy=None, promptedSolutions=None, showInkAnnotation=None, backupFile=None, saveExternalLinkValues=None, updateLinks=None, codeName=None, hidePivotFieldList=None, showPivotChartFilter=None, allowRefreshQuery=None, publishItems=None, checkCompatibility=None, autoCompressPictures=None, refreshAllConnections=None, defaultThemeVersion=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `allowRefreshQuery`

    Values must be of type <class ‘bool’>

  `autoCompressPictures`

    Values must be of type <class ‘bool’>

  `backupFile`

    Values must be of type <class ‘bool’>

  `checkCompatibility`

    Values must be of type <class ‘bool’>

  `codeName`

    Values must be of type <class ‘str’>

  `date1904`

    Values must be of type <class ‘bool’>

  `dateCompatibility`

    Values must be of type <class ‘bool’>

  `defaultThemeVersion`

    Values must be of type <class ‘int’>

  `filterPrivacy`

    Values must be of type <class ‘bool’>

  `hidePivotFieldList`

    Values must be of type <class ‘bool’>

  `promptedSolutions`

    Values must be of type <class ‘bool’>

  `publishItems`

    Values must be of type <class ‘bool’>

  `refreshAllConnections`

    Values must be of type <class ‘bool’>

  `saveExternalLinkValues`

    Values must be of type <class ‘bool’>

  `showBorderUnselectedTables`

    Values must be of type <class ‘bool’>

  `showInkAnnotation`

    Values must be of type <class ‘bool’>

  `showObjects`

    Value must be one of {‘placeholders’, ‘all’}

  `showPivotChartFilter`

    Values must be of type <class ‘bool’>

  `tagname` = 'workbookPr'
  `updateLinks`

    Value must be one of {‘never’, ‘userSet’, ‘always’}

openpyxl.workbook.protection module

`openpyxl.workbook.protection.``DocumentSecurity`

  alias of `openpyxl.workbook.protection.WorkbookProtection`

class `openpyxl.workbook.protection.``FileSharing`(readOnlyRecommended=None, userName=None, reservationPassword=None, algorithmName=None, hashValue=None, saltValue=None, spinCount=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `algorithmName`

    Values must be of type <class ‘str’>

  `hashValue`
  `readOnlyRecommended`

    Values must be of type <class ‘bool’>

  `reservationPassword`
  `saltValue`
  `spinCount`

    Values must be of type <class ‘int’>

  `tagname` = 'fileSharing'
  `userName`

    Values must be of type <class ‘str’>

class `openpyxl.workbook.protection.``WorkbookProtection`(workbookPassword=None, workbookPasswordCharacterSet=None, revisionsPassword=None, revisionsPasswordCharacterSet=None, lockStructure=None, lockWindows=None, lockRevision=None, revisionsAlgorithmName=None, revisionsHashValue=None, revisionsSaltValue=None, revisionsSpinCount=None, workbookAlgorithmName=None, workbookHashValue=None, workbookSaltValue=None, workbookSpinCount=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  classmethod `from_tree`(node)

    Don’t hash passwords when deserialising from XML

  `lockRevision`

    Values must be of type <class ‘bool’>

  `lockStructure`

    Values must be of type <class ‘bool’>

  `lockWindows`

    Values must be of type <class ‘bool’>

  `lock_revision`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `lock_structure`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `lock_windows`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `revision_password`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `revisionsAlgorithmName`

    Values must be of type <class ‘str’>

  `revisionsHashValue`
  `revisionsPassword`

    Return the revisions password value, regardless of hash.

  `revisionsPasswordCharacterSet`

    Values must be of type <class ‘str’>

  `revisionsSaltValue`
  `revisionsSpinCount`

    Values must be of type <class ‘int’>

  `set_revisions_password`(value='', already_hashed=False)

    Set a revision password on this workbook.

  `set_workbook_password`(value='', already_hashed=False)

    Set a password on this workbook.

  `tagname` = 'workbookPr'
  `workbookAlgorithmName`

    Values must be of type <class ‘str’>

  `workbookHashValue`
  `workbookPassword`

    Return the workbook password value, regardless of hash.

  `workbookPasswordCharacterSet`

    Values must be of type <class ‘str’>

  `workbookSaltValue`
  `workbookSpinCount`

    Values must be of type <class ‘int’>

  `workbook_password`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

openpyxl.workbook.smart_tags module

class `openpyxl.workbook.smart_tags.``SmartTag`(namespaceUri=None, name=None, url=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `namespaceUri`

    Values must be of type <class ‘str’>

  `tagname` = 'smartTagType'
  `url`

    Values must be of type <class ‘str’>

class `openpyxl.workbook.smart_tags.``SmartTagList`(smartTagType=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `smartTagType`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'smartTagTypes'

class `openpyxl.workbook.smart_tags.``SmartTagProperties`(embed=None, show=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `embed`

    Values must be of type <class ‘bool’>

  `show`

    Value must be one of {‘noIndicator’, ‘all’}

  `tagname` = 'smartTagPr'

openpyxl.workbook.views module

class `openpyxl.workbook.views.``BookView`(visibility='visible', minimized=False, showHorizontalScroll=True, showVerticalScroll=True, showSheetTabs=True, xWindow=None, yWindow=None, windowWidth=None, windowHeight=None, tabRatio=600, firstSheet=0, activeTab=0, autoFilterDateGrouping=True, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `activeTab`

    Values must be of type <class ‘int’>

  `autoFilterDateGrouping`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `firstSheet`

    Values must be of type <class ‘int’>

  `minimized`

    Values must be of type <class ‘bool’>

  `showHorizontalScroll`

    Values must be of type <class ‘bool’>

  `showSheetTabs`

    Values must be of type <class ‘bool’>

  `showVerticalScroll`

    Values must be of type <class ‘bool’>

  `tabRatio`

    Values must be of type <class ‘int’>

  `tagname` = 'workbookView'
  `visibility`

    Value must be one of {‘visible’, ‘veryHidden’, ‘hidden’}

  `windowHeight`

    Values must be of type <class ‘int’>

  `windowWidth`

    Values must be of type <class ‘int’>

  `xWindow`

    Values must be of type <class ‘int’>

  `yWindow`

    Values must be of type <class ‘int’>

class `openpyxl.workbook.views.``CustomWorkbookView`(name=None, guid=None, autoUpdate=None, mergeInterval=None, changesSavedWin=None, onlySync=None, personalView=None, includePrintSettings=None, includeHiddenRowCol=None, maximized=None, minimized=None, showHorizontalScroll=None, showVerticalScroll=None, showSheetTabs=None, xWindow=None, yWindow=None, windowWidth=None, windowHeight=None, tabRatio=None, activeSheetId=None, showFormulaBar=None, showStatusbar=None, showComments='commIndicator', showObjects='all', extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `activeSheetId`

    Values must be of type <class ‘int’>

  `autoUpdate`

    Values must be of type <class ‘bool’>

  `changesSavedWin`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `guid`
  `includeHiddenRowCol`

    Values must be of type <class ‘bool’>

  `includePrintSettings`

    Values must be of type <class ‘bool’>

  `maximized`

    Values must be of type <class ‘bool’>

  `mergeInterval`

    Values must be of type <class ‘int’>

  `minimized`

    Values must be of type <class ‘bool’>

  `name`

    Values must be of type <class ‘str’>

  `onlySync`

    Values must be of type <class ‘bool’>

  `personalView`

    Values must be of type <class ‘bool’>

  `showComments`

    Value must be one of {‘commIndicator’, ‘commNone’, ‘commIndAndComment’}

  `showFormulaBar`

    Values must be of type <class ‘bool’>

  `showHorizontalScroll`

    Values must be of type <class ‘bool’>

  `showObjects`

    Value must be one of {‘placeholders’, ‘all’}

  `showSheetTabs`

    Values must be of type <class ‘bool’>

  `showStatusbar`

    Values must be of type <class ‘bool’>

  `showVerticalScroll`

    Values must be of type <class ‘bool’>

  `tabRatio`

    Values must be of type <class ‘int’>

  `tagname` = 'customWorkbookView'
  `windowHeight`

    Values must be of type <class ‘int’>

  `windowWidth`

    Values must be of type <class ‘int’>

  `xWindow`

    Values must be of type <class ‘int’>

  `yWindow`

    Values must be of type <class ‘int’>

openpyxl.workbook.web module

class `openpyxl.workbook.web.``WebPublishObject`(id=None, divId=None, sourceObject=None, destinationFile=None, title=None, autoRepublish=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoRepublish`

    Values must be of type <class ‘bool’>

  `destinationFile`

    Values must be of type <class ‘str’>

  `divId`

    Values must be of type <class ‘str’>

  `id`

    Values must be of type <class ‘int’>

  `sourceObject`

    Values must be of type <class ‘str’>

  `tagname` = 'webPublishingObject'
  `title`

    Values must be of type <class ‘str’>

class `openpyxl.workbook.web.``WebPublishObjectList`(count=None, webPublishObject=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `tagname` = 'webPublishingObjects'
  `webPublishObject`

    A sequence (list or tuple) that may only contain objects of the declared type

class `openpyxl.workbook.web.``WebPublishing`(css=None, thicket=None, longFileNames=None, vml=None, allowPng=None, targetScreenSize='800x600', dpi=None, codePage=None, characterSet=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `allowPng`

    Values must be of type <class ‘bool’>

  `characterSet`

    Values must be of type <class ‘str’>

  `codePage`

    Values must be of type <class ‘int’>

  `css`

    Values must be of type <class ‘bool’>

  `dpi`

    Values must be of type <class ‘int’>

  `longFileNames`

    Values must be of type <class ‘bool’>

  `tagname` = 'webPublishing'
  `targetScreenSize`

    Value must be one of {‘1152x900’, ‘1800x1440’, ‘544x376’, ‘1600x1200’, ‘1920x1200’, ‘1280x1024’, ‘800x600’, ‘1152x882’, ‘720x512’, ‘640x480’, ‘1024x768’}

  `thicket`

    Values must be of type <class ‘bool’>

  `vml`

    Values must be of type <class ‘bool’>

openpyxl.workbook.workbook module

Workbook is the top-level container for all document information.

class `openpyxl.workbook.workbook.``Workbook`(write_only=False, iso_dates=False)

  Bases: `object`

  Workbook is the container for all other parts of the document.

  `active`

    Get the currently active sheet or None

    Type: | `openpyxl.worksheet.worksheet.Worksheet`

  `add_named_range`(named_range)

    Add an existing named_range to the list of named_ranges.

    Note

    Deprecated: Use workbook.defined_names.append

  `add_named_style`(style)

    Add a named style

  `chartsheets`

    A list of Chartsheets in this workbook

    Type: | list of `openpyxl.chartsheet.chartsheet.Chartsheet`

  `close`()

    Close workbook file if open. Only affects read-only and write-only modes.

  `copy_worksheet`(from_worksheet)

    Copy an existing worksheet in the current workbook

    Warning

    This function cannot copy worksheets between workbooks. worksheets can only be copied within the workbook that they belong

    Parameters: | from_worksheet – the worksheet to be copied from
    Returns: | copy of the initial worksheet

  `create_chartsheet`(title=None, index=None)
  `create_named_range`(name, worksheet=None, value=None, scope=None)

    Create a new named_range on a worksheet

  `create_sheet`(title=None, index=None)

    Create a worksheet (at an optional index).

    Parameters: | title (str) – optional title of the sheet index (int) – optional position at which the sheet will be inserted

  `data_only`
  `epoch`
  `excel_base_date`
  `get_index`(worksheet)

    Return the index of the worksheet.

    Note

    Deprecated: Use wb.index(worksheet)

  `get_named_range`(name)

    Return the range specified by name.

    Note

    Deprecated: Use workbook.defined_names[name]

  `get_named_ranges`()

    Return all named ranges

    Note

    Deprecated: Use workbook.defined_names.definedName

  `get_sheet_by_name`(name)

    Returns a worksheet by its name.

    > param name: | the name of the worksheet to look for
    > type name: | string

    Note

    Deprecated: Use wb[sheetname]

  `get_sheet_names`()

    Note

    Deprecated: Use wb.sheetnames

  `index`(worksheet)

    Return the index of a worksheet.

  `mime_type`

    The mime type is determined by whether a workbook is a template or not and whether it contains macros or not. Excel requires the file extension to match but openpyxl does not enforce this.

  `move_sheet`(sheet, offset=0)

    Move a sheet or sheetname

  `named_styles`

    List available named styles

  `path` = '/xl/workbook.xml'
  `read_only`
  `remove`(worksheet)

    Remove worksheet from this workbook.

  `remove_named_range`(named_range)

    Remove a named_range from this workbook.

    Note

    Deprecated: Use del workbook.defined_names[name]

  `remove_sheet`(worksheet)

    Remove worksheet from this workbook.

    Note

    Deprecated: Use wb.remove(worksheet) or del wb[sheetname]

  `save`(filename)

    Save the current workbook under the given filename. Use this function instead of using an ExcelWriter.

    Warning

    When creating your workbook using write_only set to True, you will only be able to call this function once. Subsequents attempts to modify or save the file will raise an `openpyxl.shared.exc.WorkbookAlreadySaved` exception.

  `sheetnames`

    Returns the list of the names of worksheets in this workbook.

    Names are returned in the worksheets order.

    Type: | list of strings

  `style_names`

    List of named styles

  `template` = False
  `worksheets`

    A list of sheets in this workbook

    Type: | list of `openpyxl.worksheet.worksheet.Worksheet`

  `write_only`

###### openpyxl.worksheet package

Submodules
openpyxl.worksheet.cell_range module

class `openpyxl.worksheet.cell_range.``CellRange`(range_string=None, min_col=None, min_row=None, max_col=None, max_row=None, title=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Represents a range in a sheet: title and coordinates.

  This object is used to perform operations on ranges, like:

  - shift, expand or shrink
  - union/intersection with another sheet range,

  We can check whether a range is:

  - equal or not equal to another,
  - disjoint of another,
  - contained in another.

  We can get:

  - the size of a range.
  - the range bounds (vertices)
  - the coordinates,
  - the string representation,
  `bottom`

    A list of cell coordinates that comprise the bottom of the range

  `bounds`

    Vertices of the range as a tuple

  `cells`
  `cols`

    Return cell coordinates as columns

  `coord`

    Excel-style representation of the range

  `expand`(right=0, down=0, left=0, up=0)

    Expand the range by the dimensions provided.

    Parameters: | right (int) – expand range to the right by this number of cells down (int) – expand range down by this number of cells left (int) – expand range to the left by this number of cells up (int) – expand range up by this number of cells

  `intersection`(other)

    Return a new range with cells common to this range and other

    Parameters: | other (openpyxl.worksheet.cell_range.CellRange) – Other sheet range.
    Returns: | the intersecting sheet range.
    Raise: | `ValueError` if the other range doesn’t intersect with this range.

  `isdisjoint`(other)

    Return `True` if this range has no cell in common with other. Ranges are disjoint if and only if their intersection is the empty range.

    Parameters: | other (openpyxl.worksheet.cell_range.CellRange) – Other sheet range.
    Returns: | `True` if the range has no cells in common with other.

  `issubset`(other)

    Test whether every cell in this range is also in other.

    Parameters: | other (openpyxl.worksheet.cell_range.CellRange) – Other sheet range
    Returns: | `True` if range <= other.

  `issuperset`(other)

    Test whether every cell in other is in this range.

    Parameters: | other (openpyxl.worksheet.cell_range.CellRange) – Other sheet range
    Returns: | `True` if range >= other (or other in range).

  `left`

    A list of cell coordinates that comprise the left-side of the range

  `max_col`

    Values must be of type <class ‘int’>

  `max_row`

    Values must be of type <class ‘int’>

  `min_col`

    Values must be of type <class ‘int’>

  `min_row`

    Values must be of type <class ‘int’>

  `right`

    A list of cell coordinates that comprise the right-side of the range

  `rows`

    Return cell coordinates as rows

  `shift`(col_shift=0, row_shift=0)

    Shift the focus of the range according to the shift values (col_shift, row_shift).

    Parameters: | col_shift (int) – number of columns to be moved by, can be negative row_shift (int) – number of rows to be moved by, can be negative
    Raise: | `ValueError` if any row or column index < 1

  `shrink`(right=0, bottom=0, left=0, top=0)

    Shrink the range by the dimensions provided.

    Parameters: | right (int) – shrink range from the right by this number of cells down (int) – shrink range from the top by this number of cells left (int) – shrink range from the left by this number of cells up (int) – shrink range from the bottown by this number of cells

  `size`

    Return the size of the range as a dictionary of rows and columns.

  `top`

    A list of cell coordinates that comprise the top of the range

  `union`(other)

    Return the minimal superset of this range and other. This new range will contain all cells from this range, other, and any additional cells required to form a rectangular `CellRange`.

    Parameters: | other (openpyxl.worksheet.cell_range.CellRange) – Other sheet range.
    Returns: | a `CellRange` that is a superset of this and other.

class `openpyxl.worksheet.cell_range.``MultiCellRange`(ranges=())

  Bases: `openpyxl.descriptors.Strict`

  `add`(coord)

    Add a cell coordinate or CellRange

  `ranges`

    A sequence (list or tuple) that may only contain objects of the declared type

  `remove`(coord)

openpyxl.worksheet.cell_watch module

class `openpyxl.worksheet.cell_watch.``CellWatch`(r=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `r`

    Values must be of type <class ‘str’>

  `tagname` = 'cellWatch'

class `openpyxl.worksheet.cell_watch.``CellWatches`(cellWatch=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cellWatch`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'cellWatches'

openpyxl.worksheet.controls module

class `openpyxl.worksheet.controls.``Control`(controlPr=None, shapeId=None, name=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `controlPr`

    Values must be of type <class ‘openpyxl.worksheet.controls.ControlProperty’>

  `name`

    Values must be of type <class ‘str’>

  `shapeId`

    Values must be of type <class ‘int’>

  `tagname` = 'control'

class `openpyxl.worksheet.controls.``ControlProperty`(anchor=None, locked=True, defaultSize=True, _print=True, disabled=False, recalcAlways=False, uiObject=False, autoFill=True, autoLine=True, autoPict=True, macro=None, altText=None, linkedCell=None, listFillRange=None, cf='pict', id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `altText`

    Values must be of type <class ‘str’>

  `anchor`

    Values must be of type <class ‘openpyxl.worksheet.ole.ObjectAnchor’>

  `autoFill`

    Values must be of type <class ‘bool’>

  `autoLine`

    Values must be of type <class ‘bool’>

  `autoPict`

    Values must be of type <class ‘bool’>

  `cf`

    Values must be of type <class ‘str’>

  `defaultSize`

    Values must be of type <class ‘bool’>

  `disabled`

    Values must be of type <class ‘bool’>

  `id`

    Values must be of type <class ‘str’>

  `linkedCell`

    Values must be of type <class ‘str’>

  `listFillRange`

    Values must be of type <class ‘str’>

  `locked`

    Values must be of type <class ‘bool’>

  `macro`

    Values must be of type <class ‘str’>

  `recalcAlways`

    Values must be of type <class ‘bool’>

  `tagname` = 'controlPr'
  `uiObject`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.controls.``Controls`(control=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `control`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'controls'

openpyxl.worksheet.copier module

class `openpyxl.worksheet.copier.``WorksheetCopy`(source_worksheet, target_worksheet)

  Bases: `object`

  Copy the values, styles, dimensions, merged cells, margins, and print/page setup from one worksheet to another within the same workbook.

  `copy_worksheet`()

openpyxl.worksheet.custom module

class `openpyxl.worksheet.custom.``CustomProperties`(customPr=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `customPr`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'customProperties'

class `openpyxl.worksheet.custom.``CustomProperty`(name=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'customProperty'

openpyxl.worksheet.datavalidation module

class `openpyxl.worksheet.datavalidation.``DataValidation`(type=None, formula1=None, formula2=None, showErrorMessage=True, showInputMessage=True, showDropDown=None, allowBlank=None, sqref=(), promptTitle=None, errorStyle=None, error=None, prompt=None, errorTitle=None, imeMode=None, operator=None, allow_blank=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `add`(cell)

    Adds a cell or cell coordinate to this validator

  `allowBlank`

    Values must be of type <class ‘bool’>

  `allow_blank`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `cells`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `error`

    Values must be of type <class ‘str’>

  `errorStyle`

    Value must be one of {‘information’, ‘warning’, ‘stop’}

  `errorTitle`

    Values must be of type <class ‘str’>

  `formula1`

    Values must be of type <class ‘str’>

  `formula2`

    Values must be of type <class ‘str’>

  `hide_drop_down`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `imeMode`

    Value must be one of {‘fullKatakana’, ‘fullAlpha’, ‘noControl’, ‘halfKatakana’, ‘off’, ‘hiragana’, ‘fullHangul’, ‘on’, ‘halfHangul’, ‘halfAlpha’, ‘disabled’}

  `operator`

    Value must be one of {‘between’, ‘greaterThanOrEqual’, ‘lessThan’, ‘notEqual’, ‘lessThanOrEqual’, ‘equal’, ‘greaterThan’, ‘notBetween’}

  `prompt`

    Values must be of type <class ‘str’>

  `promptTitle`

    Values must be of type <class ‘str’>

  `ranges`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `showDropDown`

    Values must be of type <class ‘bool’>

  `showErrorMessage`

    Values must be of type <class ‘bool’>

  `showInputMessage`

    Values must be of type <class ‘bool’>

  `sqref`

    Values must be of type <class ‘openpyxl.worksheet.cell_range.MultiCellRange’>

  `tagname` = 'dataValidation'
  `type`

    Value must be one of {‘whole’, ‘textLength’, ‘date’, ‘decimal’, ‘custom’, ‘list’, ‘time’}

  `validation_type`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.worksheet.datavalidation.``DataValidationList`(disablePrompts=None, xWindow=None, yWindow=None, count=None, dataValidation=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `append`(dv)
  `count`
  `dataValidation`

    A sequence (list or tuple) that may only contain objects of the declared type

  `disablePrompts`

    Values must be of type <class ‘bool’>

  `tagname` = 'dataValidations'
  `to_tree`(tagname=None)

    Need to skip validations that have no cell ranges

  `xWindow`

    Values must be of type <class ‘int’>

  `yWindow`

    Values must be of type <class ‘int’>

`openpyxl.worksheet.datavalidation.``collapse_cell_addresses`(cells, input_ranges=())

  Collapse a collection of cell co-ordinates down into an optimal range or collection of ranges.

  E.g. Cells A1, A2, A3, B1, B2 and B3 should have the data-validation object applied, attempt to collapse down to a single range, A1:B3.

  Currently only collapsing contiguous vertical ranges (i.e. above example results in A1:A3 B1:B3).

`openpyxl.worksheet.datavalidation.``expand_cell_ranges`(range_string)

  Expand cell ranges to a sequence of addresses. Reverse of collapse_cell_addresses Eg. converts “A1:A2 B1:B2” to (A1, A2, B1, B2)

openpyxl.worksheet.dimensions module

class `openpyxl.worksheet.dimensions.``ColumnDimension`(worksheet, index='A', width=13, bestFit=False, hidden=False, outlineLevel=0, outline_level=None, collapsed=False, style=None, min=None, max=None, customWidth=False, visible=None, auto_size=None)

  Bases: `openpyxl.worksheet.dimensions.Dimension`

  Information about the display properties of a column.

  `auto_size`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `bestFit`

    Values must be of type <class ‘bool’>

  `collapsed`

    Values must be of type <class ‘bool’>

  `customWidth`

    Always true if there is a width for the column

  `index`

    Values must be of type <class ‘str’>

  `max`

    Values must be of type <class ‘int’>

  `min`

    Values must be of type <class ‘int’>

  `reindex`()

    Set boundaries for column definition

  `to_tree`()
  `width`

    Values must be of type <class ‘float’>

class `openpyxl.worksheet.dimensions.``Dimension`(index, hidden, outlineLevel, collapsed, worksheet, visible=True, style=None)

  Bases: `openpyxl.descriptors.Strict`, `openpyxl.styles.styleable.StyleableObject`

  Information about the display properties of a row or column.

  `collapsed`

    Values must be of type <class ‘bool’>

  `hidden`

    Values must be of type <class ‘bool’>

  `index`

    Values must be of type <class ‘int’>

  `outlineLevel`

    Values must be of type <class ‘int’>

  `outline_level`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `style`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.worksheet.dimensions.``DimensionHolder`(worksheet, reference='index', default_factory=None)

  Bases: `openpyxl.utils.bound_dictionary.BoundDictionary`

  Allow columns to be grouped

  `group`(start, end=None, outline_level=1, hidden=False)

    allow grouping a range of consecutive rows or columns together

    Parameters: | start – first row or column to be grouped (mandatory) end – last row or column to be grouped (optional, default to start) outline_level – outline level hidden – should the group be hidden on workbook open or not

  `to_tree`()

class `openpyxl.worksheet.dimensions.``RowDimension`(worksheet, index=0, ht=None, customHeight=None, s=None, customFormat=None, hidden=False, outlineLevel=0, outline_level=None, collapsed=False, visible=None, height=None, r=None, spans=None, thickBot=None, thickTop=None, **kw)

  Bases: `openpyxl.worksheet.dimensions.Dimension`

  Information about the display properties of a row.

  `customFormat`

    Always true if there is a style for the row

  `customHeight`

    Always true if there is a height for the row

  `height`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `ht`

    Values must be of type <class ‘float’>

  `r`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `s`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `thickBot`

    Values must be of type <class ‘bool’>

  `thickTop`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.dimensions.``SheetDimension`(ref=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `boundaries`
  `ref`

    Values must be of type <class ‘str’>

  `tagname` = 'dimension'

class `openpyxl.worksheet.dimensions.``SheetFormatProperties`(baseColWidth=8, defaultColWidth=None, defaultRowHeight=15, customHeight=None, zeroHeight=None, thickTop=None, thickBottom=None, outlineLevelRow=None, outlineLevelCol=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `baseColWidth`

    Values must be of type <class ‘int’>

  `customHeight`

    Values must be of type <class ‘bool’>

  `defaultColWidth`

    Values must be of type <class ‘float’>

  `defaultRowHeight`

    Values must be of type <class ‘float’>

  `outlineLevelCol`

    Values must be of type <class ‘int’>

  `outlineLevelRow`

    Values must be of type <class ‘int’>

  `tagname` = 'sheetFormatPr'
  `thickBottom`

    Values must be of type <class ‘bool’>

  `thickTop`

    Values must be of type <class ‘bool’>

  `zeroHeight`

    Values must be of type <class ‘bool’>

openpyxl.worksheet.drawing module

class `openpyxl.worksheet.drawing.``Drawing`(id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘str’>

  `tagname` = 'drawing'

openpyxl.worksheet.errors module

class `openpyxl.worksheet.errors.``Extension`(uri=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tagname` = 'extension'
  `uri`

    Values must be of type <class ‘str’>

class `openpyxl.worksheet.errors.``ExtensionList`(ext=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `ext`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'extensionList'

class `openpyxl.worksheet.errors.``IgnoredError`(sqref=None, evalError=False, twoDigitTextYear=False, numberStoredAsText=False, formula=False, formulaRange=False, unlockedFormula=False, emptyCellReference=False, listDataValidation=False, calculatedColumn=False)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `calculatedColumn`

    Values must be of type <class ‘bool’>

  `emptyCellReference`

    Values must be of type <class ‘bool’>

  `evalError`

    Values must be of type <class ‘bool’>

  `formula`

    Values must be of type <class ‘bool’>

  `formulaRange`

    Values must be of type <class ‘bool’>

  `listDataValidation`

    Values must be of type <class ‘bool’>

  `numberStoredAsText`

    Values must be of type <class ‘bool’>

  `sqref`

    alias of `openpyxl.descriptors.excel.CellRange`

  `tagname` = 'ignoredError'
  `twoDigitTextYear`

    Values must be of type <class ‘bool’>

  `unlockedFormula`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.errors.``IgnoredErrors`(ignoredError=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.worksheet.errors.ExtensionList’>

  `ignoredError`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'ignoredErrors'

openpyxl.worksheet.filters module

class `openpyxl.worksheet.filters.``AutoFilter`(ref=None, filterColumn=(), sortState=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `add_filter_column`(col_id, vals, blank=False)

    Add row filter for specified column.

    Parameters: | col_id (int) – Zero-origin column id. 0 means first column. vals (str[]) – Value list to show. blank (bool) – Show rows that have blank cell if True (default=``False``)

  `add_sort_condition`(ref, descending=False)

    Add sort condition for cpecified range of cells.

    Parameters: | ref (string, is the same as that of the filter) – range of the cells (e.g. ‘A2:A150’) descending (bool) – Descending sort order (default=``False``)

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `filterColumn`

    A sequence (list or tuple) that may only contain objects of the declared type

  `ref`
  `sortState`

    Values must be of type <class ‘openpyxl.worksheet.filters.SortState’>

  `tagname` = 'autoFilter'

class `openpyxl.worksheet.filters.``ColorFilter`(dxfId=None, cellColor=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cellColor`

    Values must be of type <class ‘bool’>

  `dxfId`

    Values must be of type <class ‘int’>

  `tagname` = 'colorFilter'

class `openpyxl.worksheet.filters.``CustomFilter`(operator=None, val=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `operator`

    Value must be one of {‘lessThan’, ‘lessThanOrEqual’, ‘notEqual’, ‘equal’, ‘greaterThanOrEqual’, ‘greaterThan’}

  `tagname` = 'customFilter'
  `val`

    Values must be of type <class ‘str’>

class `openpyxl.worksheet.filters.``CustomFilters`(_and=None, customFilter=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `customFilter`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'customFilters'

class `openpyxl.worksheet.filters.``DateGroupItem`(year=None, month=None, day=None, hour=None, minute=None, second=None, dateTimeGrouping=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `dateTimeGrouping`

    Value must be one of {‘month’, ‘second’, ‘day’, ‘year’, ‘minute’, ‘hour’}

  `day`

    Values must be of type <class ‘float’>

  `hour`

    Values must be of type <class ‘float’>

  `minute`

    Values must be of type <class ‘float’>

  `month`

    Values must be of type <class ‘float’>

  `second`

    Values must be of type <class ‘int’>

  `tagname` = 'dateGroupItem'
  `year`

    Values must be of type <class ‘int’>

class `openpyxl.worksheet.filters.``DynamicFilter`(type=None, val=None, valIso=None, maxVal=None, maxValIso=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `maxVal`

    Values must be of type <class ‘float’>

  `maxValIso`

    Values must be of type <class ‘datetime.datetime’>

  `tagname` = 'dynamicFilter'
  `type`

    Value must be one of {‘nextQuarter’, ‘null’, ‘M10’, ‘M9’, ‘M6’, ‘thisMonth’, ‘nextYear’, ‘nextMonth’, ‘yesterday’, ‘aboveAverage’, ‘Q3’, ‘lastWeek’, ‘Q4’, ‘thisWeek’, ‘M7’, ‘yearToDate’, ‘thisYear’, ‘M3’, ‘lastMonth’, ‘nextWeek’, ‘lastYear’, ‘M5’, ‘M8’, ‘M12’, ‘M1’, ‘M11’, ‘lastQuarter’, ‘M2’, ‘Q1’, ‘M4’, ‘Q2’, ‘thisQuarter’, ‘tomorrow’, ‘today’, ‘belowAverage’}

  `val`

    Values must be of type <class ‘float’>

  `valIso`

    Values must be of type <class ‘datetime.datetime’>

class `openpyxl.worksheet.filters.``FilterColumn`(colId=None, hiddenButton=None, showButton=None, filters=None, top10=None, customFilters=None, dynamicFilter=None, colorFilter=None, iconFilter=None, extLst=None, blank=None, vals=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `colId`

    Values must be of type <class ‘int’>

  `col_id`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `colorFilter`

    Values must be of type <class ‘openpyxl.worksheet.filters.ColorFilter’>

  `customFilters`

    Values must be of type <class ‘openpyxl.worksheet.filters.CustomFilters’>

  `dynamicFilter`

    Values must be of type <class ‘openpyxl.worksheet.filters.DynamicFilter’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `filters`

    Values must be of type <class ‘openpyxl.worksheet.filters.Filters’>

  `hiddenButton`

    Values must be of type <class ‘bool’>

  `iconFilter`

    Values must be of type <class ‘openpyxl.worksheet.filters.IconFilter’>

  `showButton`

    Values must be of type <class ‘bool’>

  `tagname` = 'filterColumn'
  `top10`

    Values must be of type <class ‘openpyxl.worksheet.filters.Top10’>

class `openpyxl.worksheet.filters.``Filters`(blank=None, calendarType=None, filter=(), dateGroupItem=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `blank`

    Values must be of type <class ‘bool’>

  `calendarType`

    Value must be one of {‘gregorian’, ‘hijri’, ‘gregorianXlitFrench’, ‘taiwan’, ‘saka’, ‘gregorianXlitEnglish’, ‘gregorianArabic’, ‘gregorianUs’, ‘hebrew’, ‘thai’, ‘korea’, ‘gregorianMeFrench’, ‘japan’}

  `dateGroupItem`

    A sequence (list or tuple) that may only contain objects of the declared type

  `filter`

    A sequence of primitive types that are stored as a single attribute. “val” is the default attribute

  `tagname` = 'filters'

class `openpyxl.worksheet.filters.``IconFilter`(iconSet=None, iconId=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `iconId`

    Values must be of type <class ‘int’>

  `iconSet`

    Value must be one of {‘3Signs’, ‘4Arrows’, ‘5Rating’, ‘4TrafficLights’, ‘3Flags’, ‘3Symbols2’, ‘3TrafficLights1’, ‘3Symbols’, ‘3Arrows’, ‘4ArrowsGray’, ‘4RedToBlack’, ‘4Rating’, ‘5Arrows’, ‘5ArrowsGray’, ‘3TrafficLights2’, ‘5Quarters’, ‘3ArrowsGray’}

  `tagname` = 'iconFilter'

class `openpyxl.worksheet.filters.``SortCondition`(ref=None, descending=None, sortBy=None, customList=None, dxfId=None, iconSet=None, iconId=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `customList`

    Values must be of type <class ‘str’>

  `descending`

    Values must be of type <class ‘bool’>

  `dxfId`

    Values must be of type <class ‘int’>

  `iconId`

    Values must be of type <class ‘int’>

  `iconSet`

    Value must be one of {‘3Signs’, ‘4Arrows’, ‘5Rating’, ‘4TrafficLights’, ‘3Flags’, ‘3Symbols2’, ‘3TrafficLights1’, ‘3Symbols’, ‘3Arrows’, ‘4ArrowsGray’, ‘4RedToBlack’, ‘4Rating’, ‘5Arrows’, ‘5ArrowsGray’, ‘3TrafficLights2’, ‘5Quarters’, ‘3ArrowsGray’}

  `ref`
  `sortBy`

    Value must be one of {‘fontColor’, ‘value’, ‘cellColor’, ‘icon’}

  `tagname` = 'sortCondition'

class `openpyxl.worksheet.filters.``SortState`(columnSort=None, caseSensitive=None, sortMethod=None, ref=None, sortCondition=(), extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `caseSensitive`

    Values must be of type <class ‘bool’>

  `columnSort`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `ref`
  `sortCondition`

    A sequence (list or tuple) that may only contain objects of the declared type

  `sortMethod`

    Value must be one of {‘pinYin’, ‘stroke’}

  `tagname` = 'sortState'

class `openpyxl.worksheet.filters.``Top10`(top=None, percent=None, val=None, filterVal=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `filterVal`

    Values must be of type <class ‘float’>

  `percent`

    Values must be of type <class ‘bool’>

  `tagname` = 'top10'
  `top`

    Values must be of type <class ‘bool’>

  `val`

    Values must be of type <class ‘float’>

openpyxl.worksheet.header_footer module

class `openpyxl.worksheet.header_footer.``HeaderFooter`(differentOddEven=None, differentFirst=None, scaleWithDoc=None, alignWithMargins=None, oddHeader=None, oddFooter=None, evenHeader=None, evenFooter=None, firstHeader=None, firstFooter=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `alignWithMargins`

    Values must be of type <class ‘bool’>

  `differentFirst`

    Values must be of type <class ‘bool’>

  `differentOddEven`

    Values must be of type <class ‘bool’>

  `evenFooter`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  `evenHeader`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  `firstFooter`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  `firstHeader`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  `oddFooter`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  `oddHeader`

    Values must be of type <class ‘openpyxl.worksheet.header_footer.HeaderFooterItem’>

  `scaleWithDoc`

    Values must be of type <class ‘bool’>

  `tagname` = 'headerFooter'

class `openpyxl.worksheet.header_footer.``HeaderFooterItem`(left=None, right=None, center=None)

  Bases: `openpyxl.descriptors.Strict`

  Header or footer item

  `center`

    Values must be of type <class ‘openpyxl.worksheet.header_footer._HeaderFooterPart’>

  `centre`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  classmethod `from_tree`(node)
  `left`

    Values must be of type <class ‘openpyxl.worksheet.header_footer._HeaderFooterPart’>

  `right`

    Values must be of type <class ‘openpyxl.worksheet.header_footer._HeaderFooterPart’>

  `to_tree`(tagname)

    Return as XML node

openpyxl.worksheet.hyperlink module

class `openpyxl.worksheet.hyperlink.``Hyperlink`(ref=None, location=None, tooltip=None, display=None, id=None, target=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `display`

    Values must be of type <class ‘str’>

  `id`

    Values must be of type <class ‘str’>

  `location`

    Values must be of type <class ‘str’>

  `ref`

    Values must be of type <class ‘str’>

  `tagname` = 'hyperlink'
  `target`

    Values must be of type <class ‘str’>

  `tooltip`

    Values must be of type <class ‘str’>

class `openpyxl.worksheet.hyperlink.``HyperlinkList`(hyperlink=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `append`(value)
  `hyperlink`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'hyperlinks'

openpyxl.worksheet.merge module

class `openpyxl.worksheet.merge.``MergeCell`(ref=None)

  Bases: `openpyxl.worksheet.cell_range.CellRange`

  `ref`

    Excel-style representation of the range

  `tagname` = 'mergeCell'

class `openpyxl.worksheet.merge.``MergeCells`(count=None, mergeCell=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `count`
  `mergeCell`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'mergeCells'

class `openpyxl.worksheet.merge.``MergedCellRange`(worksheet, coord)

  Bases: `openpyxl.worksheet.cell_range.CellRange`

  MergedCellRange stores the border information of a merged cell in the top left cell of the merged cell. The remaining cells in the merged cell are stored as MergedCell objects and get their border information from the upper left cell.

  `format`()

    Each cell of the merged cell is created as MergedCell if it does not already exist.

    The MergedCells at the edge of the merged cell gets its borders from the upper left cell.

    > - The top MergedCells get the top border from the top left cell.
    > - The bottom MergedCells get the bottom border from the top left cell.
    > - The left MergedCells get the left border from the top left cell.
    > - The right MergedCells get the right border from the top left cell.

openpyxl.worksheet.ole module

class `openpyxl.worksheet.ole.``ObjectAnchor`(_from=None, to=None, moveWithCells=False, sizeWithCells=False, z_order=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `moveWithCells`

    Values must be of type <class ‘bool’>

  `sizeWithCells`

    Values must be of type <class ‘bool’>

  `tagname` = 'anchor'
  `to`

    Values must be of type <class ‘openpyxl.drawing.spreadsheet_drawing.AnchorMarker’>

  `z_order`

    Values must be of type <class ‘int’>

class `openpyxl.worksheet.ole.``ObjectPr`(anchor=None, locked=True, defaultSize=True, _print=True, disabled=False, uiObject=False, autoFill=True, autoLine=True, autoPict=True, macro=None, altText=None, dde=False)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `altText`

    Values must be of type <class ‘str’>

  `anchor`

    Values must be of type <class ‘openpyxl.worksheet.ole.ObjectAnchor’>

  `autoFill`

    Values must be of type <class ‘bool’>

  `autoLine`

    Values must be of type <class ‘bool’>

  `autoPict`

    Values must be of type <class ‘bool’>

  `dde`

    Values must be of type <class ‘bool’>

  `defaultSize`

    Values must be of type <class ‘bool’>

  `disabled`

    Values must be of type <class ‘bool’>

  `locked`

    Values must be of type <class ‘bool’>

  `macro`

    Values must be of type <class ‘str’>

  `tagname` = 'objectPr'
  `uiObject`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.ole.``OleObject`(objectPr=None, progId=None, dvAspect='DVASPECT_CONTENT', link=None, oleUpdate=None, autoLoad=False, shapeId=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoLoad`

    Values must be of type <class ‘bool’>

  `dvAspect`

    Value must be one of {‘DVASPECT_ICON’, ‘DVASPECT_CONTENT’}

  `link`

    Values must be of type <class ‘str’>

  `objectPr`

    Values must be of type <class ‘openpyxl.worksheet.ole.ObjectPr’>

  `oleUpdate`

    Value must be one of {‘OLEUPDATE_ALWAYS’, ‘OLEUPDATE_ONCALL’}

  `progId`

    Values must be of type <class ‘str’>

  `shapeId`

    Values must be of type <class ‘int’>

  `tagname` = 'oleObject'

class `openpyxl.worksheet.ole.``OleObjects`(oleObject=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `oleObject`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'oleObjects'

openpyxl.worksheet.page module

class `openpyxl.worksheet.page.``PageMargins`(left=0.75, right=0.75, top=1, bottom=1, header=0.5, footer=0.5)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Information about page margins for view/print layouts. Standard values (in inches) left, right = 0.75 top, bottom = 1 header, footer = 0.5

  `bottom`

    Values must be of type <class ‘float’>

  `footer`

    Values must be of type <class ‘float’>

  `header`

    Values must be of type <class ‘float’>

  `left`

    Values must be of type <class ‘float’>

  `right`

    Values must be of type <class ‘float’>

  `tagname` = 'pageMargins'
  `top`

    Values must be of type <class ‘float’>

class `openpyxl.worksheet.page.``PrintOptions`(horizontalCentered=None, verticalCentered=None, headings=None, gridLines=None, gridLinesSet=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Worksheet print options

  `gridLines`

    Values must be of type <class ‘bool’>

  `gridLinesSet`

    Values must be of type <class ‘bool’>

  `headings`

    Values must be of type <class ‘bool’>

  `horizontalCentered`

    Values must be of type <class ‘bool’>

  `tagname` = 'printOptions'
  `verticalCentered`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.page.``PrintPageSetup`(worksheet=None, orientation=None, paperSize=None, scale=None, fitToHeight=None, fitToWidth=None, firstPageNumber=None, useFirstPageNumber=None, paperHeight=None, paperWidth=None, pageOrder=None, usePrinterDefaults=None, blackAndWhite=None, draft=None, cellComments=None, errors=None, horizontalDpi=None, verticalDpi=None, copies=None, id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Worksheet print page setup

  `autoPageBreaks`
  `blackAndWhite`

    Values must be of type <class ‘bool’>

  `cellComments`

    Value must be one of {‘atEnd’, ‘asDisplayed’}

  `copies`

    Values must be of type <class ‘int’>

  `draft`

    Values must be of type <class ‘bool’>

  `errors`

    Value must be one of {‘dash’, ‘blank’, ‘displayed’, ‘NA’}

  `firstPageNumber`

    Values must be of type <class ‘int’>

  `fitToHeight`

    Values must be of type <class ‘int’>

  `fitToPage`
  `fitToWidth`

    Values must be of type <class ‘int’>

  classmethod `from_tree`(node)

    Create object from XML

  `horizontalDpi`

    Values must be of type <class ‘int’>

  `id`

    Values must be of type <class ‘str’>

  `orientation`

    Value must be one of {‘portrait’, ‘landscape’, ‘default’}

  `pageOrder`

    Value must be one of {‘downThenOver’, ‘overThenDown’}

  `paperHeight`
  `paperSize`

    Values must be of type <class ‘int’>

  `paperWidth`
  `scale`

    Values must be of type <class ‘int’>

  `sheet_properties`

    Proxy property

  `tagname` = 'pageSetup'
  `useFirstPageNumber`

    Values must be of type <class ‘bool’>

  `usePrinterDefaults`

    Values must be of type <class ‘bool’>

  `verticalDpi`

    Values must be of type <class ‘int’>

openpyxl.worksheet.pagebreak module

class `openpyxl.worksheet.pagebreak.``Break`(id=0, min=0, max=16383, man=True, pt=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘int’>

  `man`

    Values must be of type <class ‘bool’>

  `max`

    Values must be of type <class ‘int’>

  `min`

    Values must be of type <class ‘int’>

  `pt`

    Values must be of type <class ‘bool’>

  `tagname` = 'brk'

class `openpyxl.worksheet.pagebreak.``ColBreak`(count=None, manualBreakCount=None, brk=())

  Bases: `openpyxl.worksheet.pagebreak.RowBreak`

  `brk`

    A sequence (list or tuple) that may only contain objects of the declared type

  `count`
  `manualBreakCount`
  `tagname` = 'colBreaks'

`openpyxl.worksheet.pagebreak.``PageBreak`

  alias of `openpyxl.worksheet.pagebreak.RowBreak`

class `openpyxl.worksheet.pagebreak.``RowBreak`(count=None, manualBreakCount=None, brk=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `append`(brk=None)

    Add a page break

  `brk`

    A sequence (list or tuple) that may only contain objects of the declared type

  `count`
  `manualBreakCount`
  `tagname` = 'rowBreaks'

openpyxl.worksheet.picture module

class `openpyxl.worksheet.picture.``SheetBackgroundPicture`

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `tagname` = 'sheetBackgroundPicture'

openpyxl.worksheet.properties module

Worksheet Properties

class `openpyxl.worksheet.properties.``Outline`(applyStyles=None, summaryBelow=None, summaryRight=None, showOutlineSymbols=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `applyStyles`

    Values must be of type <class ‘bool’>

  `showOutlineSymbols`

    Values must be of type <class ‘bool’>

  `summaryBelow`

    Values must be of type <class ‘bool’>

  `summaryRight`

    Values must be of type <class ‘bool’>

  `tagname` = 'outlinePr'

class `openpyxl.worksheet.properties.``PageSetupProperties`(autoPageBreaks=None, fitToPage=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoPageBreaks`

    Values must be of type <class ‘bool’>

  `fitToPage`

    Values must be of type <class ‘bool’>

  `tagname` = 'pageSetUpPr'

class `openpyxl.worksheet.properties.``WorksheetProperties`(codeName=None, enableFormatConditionsCalculation=None, filterMode=None, published=None, syncHorizontal=None, syncRef=None, syncVertical=None, transitionEvaluation=None, transitionEntry=None, tabColor=None, outlinePr=None, pageSetUpPr=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `codeName`

    Values must be of type <class ‘str’>

  `enableFormatConditionsCalculation`

    Values must be of type <class ‘bool’>

  `filterMode`

    Values must be of type <class ‘bool’>

  `outlinePr`

    Values must be of type <class ‘openpyxl.worksheet.properties.Outline’>

  `pageSetUpPr`

    Values must be of type <class ‘openpyxl.worksheet.properties.PageSetupProperties’>

  `published`

    Values must be of type <class ‘bool’>

  `syncHorizontal`

    Values must be of type <class ‘bool’>

  `syncRef`

    Values must be of type <class ‘str’>

  `syncVertical`

    Values must be of type <class ‘bool’>

  `tabColor`

    Values must be of type <class ‘openpyxl.styles.colors.Color’>

  `tagname` = 'sheetPr'
  `transitionEntry`

    Elements

  `transitionEvaluation`

    Values must be of type <class ‘bool’>

openpyxl.worksheet.protection module

class `openpyxl.worksheet.protection.``SheetProtection`(sheet=False, objects=False, scenarios=False, formatCells=True, formatRows=True, formatColumns=True, insertColumns=True, insertRows=True, insertHyperlinks=True, deleteColumns=True, deleteRows=True, selectLockedCells=False, selectUnlockedCells=False, sort=True, autoFilter=True, pivotTables=True, password=None, algorithmName=None, saltValue=None, spinCount=None, hashValue=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`, `openpyxl.worksheet.protection._Protected`

  Information about protection of various aspects of a sheet. True values mean that protection for the object or action is active This is the default when protection is active, ie. users cannot do something

  `algorithmName`

    Values must be of type <class ‘str’>

  `autoFilter`

    Values must be of type <class ‘bool’>

  `deleteColumns`

    Values must be of type <class ‘bool’>

  `deleteRows`

    Values must be of type <class ‘bool’>

  `disable`()
  `enable`()
  `enabled`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

  `formatCells`

    Values must be of type <class ‘bool’>

  `formatColumns`

    Values must be of type <class ‘bool’>

  `formatRows`

    Values must be of type <class ‘bool’>

  `hashValue`
  `insertColumns`

    Values must be of type <class ‘bool’>

  `insertHyperlinks`

    Values must be of type <class ‘bool’>

  `insertRows`

    Values must be of type <class ‘bool’>

  `objects`

    Values must be of type <class ‘bool’>

  `pivotTables`

    Values must be of type <class ‘bool’>

  `saltValue`
  `scenarios`

    Values must be of type <class ‘bool’>

  `selectLockedCells`

    Values must be of type <class ‘bool’>

  `selectUnlockedCells`

    Values must be of type <class ‘bool’>

  `set_password`(value='', already_hashed=False)

    Set a password on this sheet.

  `sheet`

    Values must be of type <class ‘bool’>

  `sort`

    Values must be of type <class ‘bool’>

  `spinCount`

    Values must be of type <class ‘int’>

  `tagname` = 'sheetProtection'

openpyxl.worksheet.related module

class `openpyxl.worksheet.related.``Related`(id=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `id`

    Values must be of type <class ‘str’>

  `to_tree`(tagname, idx=None)

openpyxl.worksheet.scenario module

class `openpyxl.worksheet.scenario.``InputCells`(r=None, deleted=False, undone=False, val=None, numFmtId=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `deleted`

    Values must be of type <class ‘bool’>

  `numFmtId`

    Values must be of type <class ‘int’>

  `r`

    Values must be of type <class ‘str’>

  `tagname` = 'inputCells'
  `undone`

    Values must be of type <class ‘bool’>

  `val`

    Values must be of type <class ‘str’>

class `openpyxl.worksheet.scenario.``Scenario`(inputCells=(), name=None, locked=False, hidden=False, count=None, user=None, comment=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `comment`

    Values must be of type <class ‘str’>

  `count`
  `hidden`

    Values must be of type <class ‘bool’>

  `inputCells`

    A sequence (list or tuple) that may only contain objects of the declared type

  `locked`

    Values must be of type <class ‘bool’>

  `name`

    Values must be of type <class ‘str’>

  `tagname` = 'scenario'
  `user`

    Values must be of type <class ‘str’>

class `openpyxl.worksheet.scenario.``ScenarioList`(scenario=(), current=None, show=None, sqref=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `append`(scenario)
  `current`

    Values must be of type <class ‘int’>

  `scenario`

    A sequence (list or tuple) that may only contain objects of the declared type

  `show`

    Values must be of type <class ‘int’>

  `sqref`

    Values must be of type <class ‘openpyxl.worksheet.cell_range.MultiCellRange’>

  `tagname` = 'scenarios'

openpyxl.worksheet.smart_tag module

class `openpyxl.worksheet.smart_tag.``CellSmartTag`(cellSmartTagPr=(), type=None, deleted=False, xmlBased=False)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cellSmartTagPr`

    A sequence (list or tuple) that may only contain objects of the declared type

  `deleted`

    Values must be of type <class ‘bool’>

  `tagname` = 'cellSmartTag'
  `type`

    Values must be of type <class ‘int’>

  `xmlBased`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.smart_tag.``CellSmartTagPr`(key=None, val=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `key`

    Values must be of type <class ‘str’>

  `tagname` = 'cellSmartTagPr'
  `val`

    Values must be of type <class ‘str’>

class `openpyxl.worksheet.smart_tag.``CellSmartTags`(cellSmartTag=(), r=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cellSmartTag`

    A sequence (list or tuple) that may only contain objects of the declared type

  `r`

    Values must be of type <class ‘str’>

  `tagname` = 'cellSmartTags'

class `openpyxl.worksheet.smart_tag.``SmartTags`(cellSmartTags=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `cellSmartTags`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'smartTags'

openpyxl.worksheet.table module

class `openpyxl.worksheet.table.``Table`(id=1, displayName=None, ref=None, name=None, comment=None, tableType=None, headerRowCount=1, insertRow=None, insertRowShift=None, totalsRowCount=None, totalsRowShown=None, published=None, headerRowDxfId=None, dataDxfId=None, totalsRowDxfId=None, headerRowBorderDxfId=None, tableBorderDxfId=None, totalsRowBorderDxfId=None, headerRowCellStyle=None, dataCellStyle=None, totalsRowCellStyle=None, connectionId=None, autoFilter=None, sortState=None, tableColumns=(), tableStyleInfo=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `autoFilter`

    Values must be of type <class ‘openpyxl.worksheet.filters.AutoFilter’>

  `column_names`
  `comment`

    Values must be of type <class ‘str’>

  `connectionId`

    Values must be of type <class ‘int’>

  `dataCellStyle`

    Values must be of type <class ‘str’>

  `dataDxfId`

    Values must be of type <class ‘int’>

  `displayName`

    Values must be of type <class ‘str’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `headerRowBorderDxfId`

    Values must be of type <class ‘int’>

  `headerRowCellStyle`

    Values must be of type <class ‘str’>

  `headerRowCount`

    Values must be of type <class ‘int’>

  `headerRowDxfId`

    Values must be of type <class ‘int’>

  `id`

    Values must be of type <class ‘int’>

  `insertRow`

    Values must be of type <class ‘bool’>

  `insertRowShift`

    Values must be of type <class ‘bool’>

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml'
  `name`

    Values must be of type <class ‘str’>

  `path`

    Return path within the archive

  `published`

    Values must be of type <class ‘bool’>

  `ref`
  `sortState`

    Values must be of type <class ‘openpyxl.worksheet.filters.SortState’>

  `tableBorderDxfId`

    Values must be of type <class ‘int’>

  `tableColumns`

    Wrap a sequence in an containing object

  `tableStyleInfo`

    Values must be of type <class ‘openpyxl.worksheet.table.TableStyleInfo’>

  `tableType`

    Value must be one of {‘worksheet’, ‘xml’, ‘queryTable’}

  `tagname` = 'table'
  `to_tree`()
  `totalsRowBorderDxfId`

    Values must be of type <class ‘int’>

  `totalsRowCellStyle`

    Values must be of type <class ‘str’>

  `totalsRowCount`

    Values must be of type <class ‘int’>

  `totalsRowDxfId`

    Values must be of type <class ‘int’>

  `totalsRowShown`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.table.``TableColumn`(id=None, uniqueName=None, name=None, totalsRowFunction=None, totalsRowLabel=None, queryTableFieldId=None, headerRowDxfId=None, dataDxfId=None, totalsRowDxfId=None, headerRowCellStyle=None, dataCellStyle=None, totalsRowCellStyle=None, calculatedColumnFormula=None, totalsRowFormula=None, xmlColumnPr=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `calculatedColumnFormula`

    Values must be of type <class ‘openpyxl.worksheet.table.TableFormula’>

  `dataCellStyle`

    Values must be of type <class ‘str’>

  `dataDxfId`

    Values must be of type <class ‘int’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  classmethod `from_tree`(node)

    Create object from XML

  `headerRowCellStyle`

    Values must be of type <class ‘str’>

  `headerRowDxfId`

    Values must be of type <class ‘int’>

  `id`

    Values must be of type <class ‘int’>

  `name`

    Values must be of type <class ‘str’>

  `queryTableFieldId`

    Values must be of type <class ‘int’>

  `tagname` = 'tableColumn'
  `totalsRowCellStyle`

    Values must be of type <class ‘str’>

  `totalsRowDxfId`

    Values must be of type <class ‘int’>

  `totalsRowFormula`

    Values must be of type <class ‘openpyxl.worksheet.table.TableFormula’>

  `totalsRowFunction`

    Value must be one of {‘countNums’, ‘average’, ‘stdDev’, ‘min’, ‘count’, ‘sum’, ‘custom’, ‘var’, ‘max’}

  `totalsRowLabel`

    Values must be of type <class ‘str’>

  `uniqueName`

    Values must be of type <class ‘str’>

  `xmlColumnPr`

    Values must be of type <class ‘openpyxl.worksheet.table.XMLColumnProps’>

class `openpyxl.worksheet.table.``TableFormula`(array=None, attr_text=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `array`

    Values must be of type <class ‘bool’>

  `attr_text`
  `tagname` = 'tableFormula'
  `text`

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class `openpyxl.worksheet.table.``TableList`

  Bases: `dict`

  `add`(table)
  `get`(name=None, table_range=None)

    Return the value for key if key is in the dictionary, else default.

  `items`() → a set-like object providing a view on D's items

class `openpyxl.worksheet.table.``TableNameDescriptor`(*args, **kw)

  Bases: `openpyxl.descriptors.base.String`

  Table names cannot have spaces in them

class `openpyxl.worksheet.table.``TablePartList`(count=None, tablePart=())

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `append`(part)
  `count`
  `tablePart`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'tableParts'

class `openpyxl.worksheet.table.``TableStyleInfo`(name=None, showFirstColumn=None, showLastColumn=None, showRowStripes=None, showColumnStripes=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `name`

    Values must be of type <class ‘str’>

  `showColumnStripes`

    Values must be of type <class ‘bool’>

  `showFirstColumn`

    Values must be of type <class ‘bool’>

  `showLastColumn`

    Values must be of type <class ‘bool’>

  `showRowStripes`

    Values must be of type <class ‘bool’>

  `tagname` = 'tableStyleInfo'

class `openpyxl.worksheet.table.``XMLColumnProps`(mapId=None, xpath=None, denormalized=None, xmlDataType=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `denormalized`

    Values must be of type <class ‘bool’>

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `mapId`

    Values must be of type <class ‘int’>

  `tagname` = 'xmlColumnPr'
  `xmlDataType`

    Values must be of type <class ‘str’>

  `xpath`

    Values must be of type <class ‘str’>

openpyxl.worksheet.views module

class `openpyxl.worksheet.views.``Pane`(xSplit=None, ySplit=None, topLeftCell=None, activePane='topLeft', state='split')

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `activePane`

    Value must be one of {‘topLeft’, ‘topRight’, ‘bottomLeft’, ‘bottomRight’}

  `state`

    Value must be one of {‘frozenSplit’, ‘split’, ‘frozen’}

  `topLeftCell`

    Values must be of type <class ‘str’>

  `xSplit`

    Values must be of type <class ‘float’>

  `ySplit`

    Values must be of type <class ‘float’>

class `openpyxl.worksheet.views.``Selection`(pane=None, activeCell='A1', activeCellId=None, sqref='A1')

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `activeCell`

    Values must be of type <class ‘str’>

  `activeCellId`

    Values must be of type <class ‘int’>

  `pane`

    Value must be one of {‘topLeft’, ‘topRight’, ‘bottomLeft’, ‘bottomRight’}

  `sqref`

    Values must be of type <class ‘str’>

class `openpyxl.worksheet.views.``SheetView`(windowProtection=None, showFormulas=None, showGridLines=None, showRowColHeaders=None, showZeros=None, rightToLeft=None, tabSelected=None, showRuler=None, showOutlineSymbols=None, defaultGridColor=None, showWhiteSpace=None, view=None, topLeftCell=None, colorId=None, zoomScale=None, zoomScaleNormal=None, zoomScaleSheetLayoutView=None, zoomScalePageLayoutView=None, zoomToFit=None, workbookViewId=0, selection=None, pane=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  Information about the visible portions of this sheet.

  `colorId`

    Values must be of type <class ‘int’>

  `defaultGridColor`

    Values must be of type <class ‘bool’>

  `pane`

    Values must be of type <class ‘openpyxl.worksheet.views.Pane’>

  `rightToLeft`

    Values must be of type <class ‘bool’>

  `selection`

    A sequence (list or tuple) that may only contain objects of the declared type

  `showFormulas`

    Values must be of type <class ‘bool’>

  `showGridLines`

    Values must be of type <class ‘bool’>

  `showOutlineSymbols`

    Values must be of type <class ‘bool’>

  `showRowColHeaders`

    Values must be of type <class ‘bool’>

  `showRuler`

    Values must be of type <class ‘bool’>

  `showWhiteSpace`

    Values must be of type <class ‘bool’>

  `showZeros`

    Values must be of type <class ‘bool’>

  `tabSelected`

    Values must be of type <class ‘bool’>

  `tagname` = 'sheetView'
  `topLeftCell`

    Values must be of type <class ‘str’>

  `view`

    Value must be one of {‘pageBreakPreview’, ‘normal’, ‘pageLayout’}

  `windowProtection`

    Values must be of type <class ‘bool’>

  `workbookViewId`

    Values must be of type <class ‘int’>

  `zoomScale`

    Values must be of type <class ‘int’>

  `zoomScaleNormal`

    Values must be of type <class ‘int’>

  `zoomScalePageLayoutView`

    Values must be of type <class ‘int’>

  `zoomScaleSheetLayoutView`

    Values must be of type <class ‘int’>

  `zoomToFit`

    Values must be of type <class ‘bool’>

class `openpyxl.worksheet.views.``SheetViewList`(sheetView=None, extLst=None)

  Bases: `openpyxl.descriptors.serialisable.Serialisable`

  `extLst`

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  `sheetView`

    A sequence (list or tuple) that may only contain objects of the declared type

  `tagname` = 'sheetViews'

openpyxl.worksheet.worksheet module

Worksheet is the 2nd-level container in Excel.

class `openpyxl.worksheet.worksheet.``Worksheet`(parent, title=None)

  Bases: `openpyxl.workbook.child._WorkbookChild`

  Represents a worksheet.

  Do not create worksheets yourself, use `openpyxl.workbook.Workbook.create_sheet()` instead

  `BREAK_COLUMN` = 2
  `BREAK_NONE` = 0
  `BREAK_ROW` = 1
  `ORIENTATION_LANDSCAPE` = 'landscape'
  `ORIENTATION_PORTRAIT` = 'portrait'
  `PAPERSIZE_A3` = '8'
  `PAPERSIZE_A4` = '9'
  `PAPERSIZE_A4_SMALL` = '10'
  `PAPERSIZE_A5` = '11'
  `PAPERSIZE_EXECUTIVE` = '7'
  `PAPERSIZE_LEDGER` = '4'
  `PAPERSIZE_LEGAL` = '5'
  `PAPERSIZE_LETTER` = '1'
  `PAPERSIZE_LETTER_SMALL` = '2'
  `PAPERSIZE_STATEMENT` = '6'
  `PAPERSIZE_TABLOID` = '3'
  `SHEETSTATE_HIDDEN` = 'hidden'
  `SHEETSTATE_VERYHIDDEN` = 'veryHidden'
  `SHEETSTATE_VISIBLE` = 'visible'
  `active_cell`
  `add_chart`(chart, anchor=None)

    Add a chart to the sheet Optionally provide a cell for the top-left anchor

  `add_data_validation`(data_validation)

    Add a data-validation object to the sheet. The data-validation object defines the type of data-validation to be applied and the cell or range of cells it should apply to.

  `add_image`(img, anchor=None)

    Add an image to the sheet. Optionally provide a cell for the top-left anchor

  `add_pivot`(pivot)
  `add_table`(table)

    Check for duplicate name in definedNames and other worksheet tables before adding table.

  `append`(iterable)

    Appends a group of values at the bottom of the current sheet.

    - If it’s a list: all values are added in order, starting from the first column
    - If it’s a dict: values are assigned to the columns indicated by the keys (numbers or letters)

    Parameters: | iterable (list|tuple|range|generator or dict) – list, range or generator, or dict containing values to append

    Usage:

    - append([‘This is A1’, ‘This is B1’, ‘This is C1’])
    - or append({‘A’ : ‘This is A1’, ‘C’ : ‘This is C1’})
    - or append({1 : ‘This is A1’, 3 : ‘This is C1’})

    Raise: | TypeError when iterable is neither a list/tuple nor a dict

  `calculate_dimension`()

    Return the minimum bounding range for all cells containing data (ex. ‘A1:M24’)

    Return type: | string

  `cell`(row, column, value=None)

    Returns a cell object based on the given coordinates.

    Usage: cell(row=15, column=1, value=5)

    Calling cell creates cells in memory when they are first accessed.

    Parameters: | row (int) – row index of the cell (e.g. 4) column (int) – column index of the cell (e.g. 3) value (numeric or time or string or bool or none) – value of the cell (e.g. 5)
    Return type: | openpyxl.cell.cell.Cell

  `columns`

    Produces all cells in the worksheet, by column (see `iter_cols()`)

  `delete_cols`(idx, amount=1)

    Delete column or columns from col==idx

  `delete_rows`(idx, amount=1)

    Delete row or rows from row==idx

  `dimensions`

    Returns the result of `calculate_dimension()`

  `freeze_panes`
  `insert_cols`(idx, amount=1)

    Insert column or columns before col==idx

  `insert_rows`(idx, amount=1)

    Insert row or rows before row==idx

  `iter_cols`(min_col=None, max_col=None, min_row=None, max_row=None, values_only=False)

    Produces cells from the worksheet, by column. Specify the iteration range using indices of rows and columns.

    If no indices are specified the range starts at A1.

    If no cells are in the worksheet an empty tuple will be returned.

    Parameters: | min_col (int) – smallest column index (1-based index) min_row (int) – smallest row index (1-based index) max_col (int) – largest column index (1-based index) max_row (int) – largest row index (1-based index) values_only (bool) – whether only cell values should be returned
    Return type: | generator

  `iter_rows`(min_row=None, max_row=None, min_col=None, max_col=None, values_only=False)

    Produces cells from the worksheet, by row. Specify the iteration range using indices of rows and columns.

    If no indices are specified the range starts at A1.

    If no cells are in the worksheet an empty tuple will be returned.

    Parameters: | min_col (int) – smallest column index (1-based index) min_row (int) – smallest row index (1-based index) max_col (int) – largest column index (1-based index) max_row (int) – largest row index (1-based index) values_only (bool) – whether only cell values should be returned
    Return type: | generator

  `max_column`

    The maximum column index containing data (1-based)

    Type: | int

  `max_row`

    The maximum row index containing data (1-based)

    Type: | int

  `merge_cells`(range_string=None, start_row=None, start_column=None, end_row=None, end_column=None)

    Set merge on a cell range. Range is a cell range (e.g. A1:E1)

  `merged_cell_ranges`

    Return a copy of cell ranges

    Note

    Deprecated: Use ws.merged_cells.ranges

  `mime_type` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'
  `min_column`

    The minimum column index containing data (1-based)

    Type: | int

  `min_row`

    The minimium row index containing data (1-based)

    Type: | int

  `move_range`(cell_range, rows=0, cols=0, translate=False)

    Move a cell range by the number of rows and/or columns: down if rows > 0 and up if rows < 0 right if cols > 0 and left if cols < 0 Existing cells will be overwritten. Formulae and references will not be updated.

  `page_breaks`
  `print_area`

    The print area for the worksheet, or None if not set. To set, supply a range like ‘A1:D4’ or a list of ranges.

  `print_title_cols`

    Columns to be printed at the left side of every page (ex: ‘A:C’)

  `print_title_rows`

    Rows to be printed at the top of every page (ex: ‘1:3’)

  `print_titles`
  `rows`

    Produces all cells in the worksheet, by row (see `iter_rows()`)

    Type: | generator

  `selected_cell`
  `set_printer_settings`(paper_size, orientation)

    Set printer settings

  `sheet_view`
  `show_gridlines`
  `show_summary_below`
  `show_summary_right`
  `tables`
  `unmerge_cells`(range_string=None, start_row=None, start_column=None, end_row=None, end_column=None)

    Remove merge on a cell range. Range is a cell range (e.g. A1:E1)

  `values`

    Produces all cell values in the worksheet, by row

    Type: | generator

`openpyxl.worksheet.worksheet.``isgenerator`(obj)

###### openpyxl.writer package

Submodules
openpyxl.writer.excel module

Write a .xlsx file.

class `openpyxl.writer.excel.``ExcelWriter`(workbook, archive)

  Bases: `object`

  Write a workbook object to an Excel file.

  `save`()

    Write data into the archive.

  `write_data`()

    Write the various xml files into the zip archive.

  `write_worksheet`(ws)

`openpyxl.writer.excel.``save_virtual_workbook`(workbook)

  Return an in-memory workbook, suitable for a Django response.

  Note

  Deprecated: Use a NamedTemporaryFile

`openpyxl.writer.excel.``save_workbook`(workbook, filename)

  Save the given workbook on the filesystem under the name filename.

  Parameters: | workbook (`openpyxl.workbook.Workbook`) – the workbook to save filename (string) – the path to which save the workbook
  Return type: | bool

openpyxl.writer.theme module

Write the theme xml based on a fixed string.

`openpyxl.writer.theme.``write_theme`()

  Write the theme xml.

###### openpyxl.xml package

Collection of XML resources compatible across different Python versions

`openpyxl.xml.``defusedxml_available`()

`openpyxl.xml.``defusedxml_env_set`()

`openpyxl.xml.``lxml_available`()

`openpyxl.xml.``lxml_env_set`()

Submodules
openpyxl.xml.constants module

Constants for fixed paths in a file and xml namespace urls.

openpyxl.xml.functions module

XML compatability functions

`openpyxl.xml.functions.``localname`(node)

`openpyxl.xml.functions.``whitespace`(node)

# Indices and tables

- Index
- Module Index
- Search Page

# Release Notes

## 3.0.10 (2021-05-13)

### Bugfixes

- #1684 Image files not closed when workbooks are saved
- #1778 Problem with missing scope attribute in Pivot Table formats
- #1821 Excel unhappy when multiple sorts are defined

## 3.0.9 (2021-09-22)

### Bugfixes

- #1284 Ignore blank ignored in existing Data Validations
- #1539 Add support for cell protection for merged cell ranges
- #1645 Timezone-aware datetimes raise an Exception
- #1666 Improved normalisation of chart series
- #1670 Catch OverflowError for out of range datetimes
- #1708 Alignment.relativeIndent can be negative
- #1736 Incorrect default value groupBy attribute

## 3.0.8 (brown bag)

Deleted because it contained breaking changes from 3.1

## 3.0.7 (2021-03-09)

### Bugfixes

- #1510 Problems with zero time values
- #1588 Not possible to correctly convert excel dates to timedelta
- #1589 Exception raised when merging cells which do not have borders all the way round.
- #1594 Python 2 print statement in the tutorial

### Pull Requests

- PR392 Add documentation on datetime handling
- PR393 Drop dependency on jdcal
- PR394 Datetime rounding
- PR395 Unify handling of 1900 epoch
- PR397 Add explicit support for reading datetime deltas
- PR399 Millisecond precision for datetimes

## 3.0.6 (2021-01-14)

### Bugfixes

- #1154 Borders in differential styles are incorrect
- #1287 Error when opening some pivot tables
- #1366 Resave breaks the border format in conditional formatting rules
- #1450 Read-only workbook not closed properly if generator interrupted
- #1547 Pandas.Multiindex.labels deprecated
- #1552 Pandas.Multiinex not expanded correctly
- #1557 Cannot read rows with exponents
- #1568 numpy.float is deprecated
- #1571 Cells without coordinate attributes not always correctly handled

### Pull Requests

- PR385 Improved handling of borders for differential styles
- PR386 Support subclasses of datetime objects
- PR387 Improved handling of cells without coordinates

## 3.0.5 (2020-08-21)

### Bugfixes

- #1413 Incorrectly consider currency format as datetime
- #1490 Cannot copy worksheets with merged cells
- #1492 Empty worksheets do not return generators when looping.
- #1496 Hyperlinks duplicated on multiple saves
- #1500 Incorrectly literal format as datetime
- #1502 Links set to range of cells not preserved
- #1507 Exception when opening workbook with chartsheets and tables

## 3.0.4 (2020-06-24)

### Bugfixes

- #844 Find tables by name
- #1414 Worksheet protection missing in existing files
- #1439 Exception when reading files with external images
- #1452 Reading lots of merged cells is very slow.
- #1455 Read support for Bubble Charts.
- #1458 Preserve any indexed colours
- #1473 Reading many thousand of merged cells is really slow.
- #1474 Adding tables in write-only mode raises an exception.

### Pull Requests

- PR377 Add support for finding tables by name or range.

## 3.0.3 (2020-01-20)

### Bugfixes

- #1260 Exception when handling merged cells with hyperlinks
- #1373 Problems when both lxml and defusedxml are installed
- #1385 CFVO with incorrect values cannot be processed

## 3.0.2 (2019-11-25)

### Bug fixes

- #1267 DeprecationError if both defusedxml and lxml are installed
- #1345 ws._current_row is higher than ws.max_row
- #1365 Border bottom style is not optional when it should be
- #1367 Empty cells in read-only, values-only mode are sometimes returned as ReadOnlyCells
- #1368 Cannot add page breaks to existing worksheets if none exist already

### Pull Requests

- PR359 Improvements to the documentation

## 3.0.1 (2019-11-14)

### Bugfixes

- #1250 Cannot read empty charts.

### Pull Requests

- PR354 Fix for #1250
- PR352 TableStyleElement is a sequence

## 3.0.0 (2019-09-25)

### Python 3.6+ only release

## 2.6.4 (2019-09-25)

### Final release for Python 2.7 and 3.5

### Bugfixes

- ` #1330 <https://foss.heptapod.net/openpyxl/openpyxl/-/issues/1330>`_ Cannot save workbooks with comments more than once.

## 2.6.3 (2019-08-19)

### Bugfixes

- #1237 Fix 3D charts.
- #1290 Minimum for holeSize in Doughnut charts too high
- #1291 Warning for MergedCells with comments
- #1296 Pagebreaks duplicated
- #1309 Workbook has no default CellStyle
- #1330 Workbooks with comments cannot be saved multiple times

### Pull Requests

- PR344 Make sure NamedStyles number formats are correctly handled

## 2.6.2 (2019-03-29)

### Bugfixes

- #1173 Workbook has no _date_formats attribute
- #1190 Cannot create charts for worksheets with quotes in the title
- #1228 MergedCells not removed when range is unmerged
- #1232 Link to pivot table lost from charts
- #1233 Chart colours change after saving
- #1236 Cannot use ws.cell in read-only mode with Python 2.7

## 2.6.1 (2019-03-04)

### Bugfixes

- #1174 ReadOnlyCell.is_date does not work properly
- #1175 Cannot read Google Docs spreadsheet with a Pivot Table
- #1180 Charts created with openpyxl cannot be styled
- #1181 Cannot handle some numpy number types
- #1182 Exception when reading unknowable number formats
- #1186 Only last formatting rule for a range loaded
- #1191 Give MergedCell a value attribute
- #1193 Cannot process worksheets with comments
- #1197 Cannot process worksheets with both row and page breaks
- #1204 Cannot reset dimensions in ReadOnlyWorksheets
- #1211 Incorrect descriptor in ParagraphProperties
- #1213 Missing hier attribute in PageField raises an exception

## 2.6.0 (2019-02-06)

### Bugfixes

- #1162 Exception on tables with names containing spaces.
- #1170 Cannot save files with existing images.

## 2.6.-b1 (2019-01-08)

### Bugfixes

- #1141 Cannot use read-only mode with stream
- #1143 Hyperlinks always set on A1
- #1151 Internal row counter not initialised when reading files
- #1152 Exception raised on out of bounds date

## 2.6-a1 (2018-11-21)

### Major changes

- Implement robust for merged cells so that these can be formatted the way Excel does without confusion. Thanks to Magnus Schieder.

### Minor changes

- Add support for worksheet scenarios
- Add read support for chartsheets
- Add method for moving ranges of cells on a worksheet
- Drop support for Python 3.4
- Last version to support Python 2.7

### Deprecations

- Type inference and coercion for cell values

## 2.5.14 (2019-01-23)

### Bugfixes

- #1150 Correct typo in LineProperties
- #1142 Exception raised for unsupported image files
- #1159 Exception raised when cannot find source for non-local cache object

### Pull Requests

- PR301 Add support for nested brackets to the tokeniser
- PR303 Improvements on handling nested brackets in the tokeniser

## 2.5.13 (brown bag)

## 2.5.12 (2018-11-29)

### Bugfixes

- #1130 Overwriting default font in Normal style affects library default
- #1133 Images not added to anchors.
- #1134 Cannot read pivot table formats without dxId
- #1138 Repeated registration of simple filter could lead to memory leaks

### Pull Requests

- PR300 Use defusedxml if available

## 2.5.11 (2018-11-21)

### Pull Requests

- PR295 Improved handling of missing rows
- PR296 Add support for defined names to tokeniser

## 2.5.10 (2018-11-13)

### Bugfixes

- #1114 Empty column dimensions should not be saved.

### Pull Requests

- PR285 Tokenizer failure for quoted sheet name in second half of range
- PR289 Improved error detection in ranges.

## 2.5.9 (2018-10-19)

### Bugfixes

- #1000 Clean AutoFilter name definitions
- #1106 Attribute missing from Shape object
- #1109 Failure to read all DrawingML means workbook can’t be read

### Pull Requests

- PR281 Allow newlines in formulae
- PR284 Fix whitespace in front of infix operator in formulae

## 2.5.8 (2018-09-25)

- #877 Cannot control how missing values are displayed in charts.
- #948 Cell references can’t be used for chart titles
- #1095 Params in iter_cols and iter_rows methods are slightly wrong.

## 2.5.7 (2018-09-13)

- #954 Sheet title containing % need quoting in references
- #1047 Cannot set quote prefix
- #1093 Pandas timestamps raise KeyError

## 2.5.6 (2018-08-30)

- #832 Read-only mode can leave find-handles open when reading dimensions
- #933 Set a worksheet directly as active
- #1086 Internal row counter not adjusted when rows are deleted or inserted

## 2.5.5 (2018-08-04)

### Bugfixes

- #1049 Files with Mac epoch are read incorrectly
- #1058 Cannot copy merged cells
- #1066 Cannot access ws.active_cell

### Pull Requests

- PR267 Introduce read-support for images

## 2.5.4 (2018-06-07)

### Bugfixes

- #1025 Cannot read files with 3D charts.
- #1030 Merged cells take a long time to parse

### Minor changes

- Improve read support for pivot tables and don’t always create a Filters child for filterColumn objects.
- Support folding rows <https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/259/fold-rows>`_

## 2.5.3 (2018-04-18)

### Bugfixes

- #983 Warning level too aggressive.
- #1015 Alignment and protection values not saved for named styles.
- #1017 Deleting elements from a legend doesn’t work.
- #1018 Index names repeated for every row in dataframe.
- #1020 Worksheet protection not being stored.
- #1023 Exception raised when reading a tooltip.

## 2.5.2 (2018-04-06)

### Bugfixes

- #949 High memory use when reading text-heavy files.
- #970 Copying merged cells copies references.
- #978 Cannot set comment size.
- #985 Exception when trying to save workbooks with no views.
- #995 Cannot delete last row or column.
- #1002 Cannot read Drawings containing embedded images.

### Minor changes

- Support for dataframes with multiple columns and multiple indices.

## 2.5.1 (2018-03-12)

### Bugfixes

- #934 Headers and footers not included in write-only mode.
- #960 Deprecation warning raised when using ad-hoc access in read-only mode.
- #964 Not all cells removed when deleting multiple rows.
- #966 Cannot read 3d bar chart correctly.
- #967 Problems reading some charts.
- #968 Worksheets with SHA protection become corrupted after saving.
- #974 Problem when deleting ragged rows or columns.
- #976 GroupTransforms and GroupShapeProperties have incorrect descriptors
- Make sure that headers and footers in chartsheets are included in the file

## 2.5.0 (2018-01-24)

### Minor changes

- Correct definition for Connection Shapes. Related to # 958

## 2.5.0-b2 (2018-01-19)

### Bugfixes

- #915 TableStyleInfo has no required attributes
- #925 Cannot read files with 3D drawings
- #926 Incorrect version check in installer
- Cell merging uses transposed parameters
- #928 ExtLst missing keyword for PivotFields
- #932 Inf causes problems for Excel
- #952 Cannot load table styles with custom names

### Major Changes

- You can now insert and delete rows and columns in worksheets

### Minor Changes

- pip now handles which Python versions can be used.

## 2.5.0-b1 (2017-10-19)

### Bugfixes

- #812 Explicitly support for multiple cell ranges in conditonal formatting
- #827 Non-contiguous cell ranges in validators get merged
- #837 Empty data validators create invalid Excel files
- #860 Large validation ranges use lots of memory
- #876 Unicode in chart axes not handled correctly in Python 2
- #882 ScatterCharts have defective axes
- #885 Charts with empty numVal elements cannot be read
- #894 Scaling options from existing files ignored
- #895 Charts with PivotSource cannot be read
- #903 Cannot read gradient fills
- #904 Quotes in number formats could be treated as datetimes

### Major Changes

worksheet.cell() no longer accepts a coordinate parameter. The syntax is now ws.cell(row, column, value=None)

### Minor Changes

Added CellRange and MultiCellRange types (thanks to Laurent LaPorte for the suggestion) as a utility type for things like data validations, conditional formatting and merged cells.

### Deprecations

ws.merged_cell_ranges has been deprecated because MultiCellRange provides sufficient functionality

## 2.5.0-a3 (2017-08-14)

### Bugfixes

- #848 Reading workbooks with Pie Charts raises an exception
- #857 Pivot Tables without Worksheet Sources raise an exception

## 2.5.0-a2 (2017-06-25)

### Major Changes

- Read support for charts

### Bugfixes

- #833 Cannot access chartsheets by title
- #834 Preserve workbook views
- #841 Incorrect classification of a datetime

## 2.5.0-a1 (2017-05-30)

### Compatibility

- Dropped support for Python 2.6 and 3.3. openpyxl will not run with Python 2.6

### Major Changes

- Read/write support for pivot tables

### Deprecations

- Dropped the anchor method from images and additional constructor arguments

### Bugfixes

- #779 Fails to recognise Chinese date format`
- #828 Include hidden cells in charts`

### Pull requests

- 163 Improved GradientFill

### Minor changes

- Remove deprecated methods from Cell
- Remove deprecated methods from Worksheet
- Added read/write support for the datetime type for cells

## 2.4.11 (2018-01-24)

- #957 https://foss.heptapod.net/openpyxl/openpyxl/-/issues/957 Relationship type for tables is borked

## 2.4.10 (2018-01-19)

### Bugfixes

- #912 https://foss.heptapod.net/openpyxl/openpyxl/-/issues/912 Copying objects uses shallow copy
- #921 https://foss.heptapod.net/openpyxl/openpyxl/-/issues/921 API documentation not generated automatically
- #927 https://foss.heptapod.net/openpyxl/openpyxl/-/issues/927 Exception raised when adding coloured borders together
- #931 https://foss.heptapod.net/openpyxl/openpyxl/-/issues/931 Number formats not correctly deduplicated

### Pull requests

- 203 https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/203/ Correction to worksheet protection description
- 210 https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/210/ Some improvements to the API docs
- 211 https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/211/ Improved deprecation decorator
- 218 https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/218/ Fix problems with deepcopy

## 2.4.9 (2017-10-19)

### Bugfixes

- #809 Incomplete documentation of copy_worksheet method
- #811 Scoped definedNames not removed when worksheet is deleted
- #824 Raise an exception if a chart is used in multiple sheets
- #842 Non-ASCII table column headings cause an exception in Python 2
- #846 Conditional formats not supported in write-only mode
- #849 Conditional formats with no sqref cause an exception
- #859 Headers that start with a number conflict with font size
- #902 TableStyleElements don’t always have a condtional format
- #908 Read-only mode sometimes returns too many cells

### Pull requests

- #179 Cells kept in a set
- #180 Support for Workbook protection
- #182 Read support for page breaks
- #183 Improve documentation of copy_worksheet method
- #198 Fix for #908

## 2.4.8 (2017-05-30)

### Bugfixes

- AutoFilter.sortState being assignd to the ws.sortState
- #766 Sheetnames with apostrophes need additional escaping
- #729 Cannot open files created by Microsoft Dynamics
- #819 Negative percents not case correctly
- #821 Runtime imports can cause deadlock
- #855 Print area containing only columns leads to corrupt file

### Minor changes

- Preserve any table styles

## 2.4.7 (2017-04-24)

### Bugfixes

- #807 Sample files being included by mistake in sdist

## 2.4.6 (2017-04-14)

### Bugfixes

- #776 Cannot apply formatting to plot area
- #780 Exception when element attributes are Python keywords
- #781 Exception raised when saving files with styled columns
- #785 Number formats for data labels are incorrect
- #788 Worksheet titles not quoted in defined names
- #800 Font underlines not read correctly

## 2.4.5 (2017-03-07)

### Bugfixes

- #750 Adding images keeps file handles open
- #772 Exception for column-only ranges
- #773 Cannot copy worksheets with non-ascii titles on Python 2

### Pull requests

- 161 Support for non-standard names for Workbook part.
- 162 Documentation correction

## 2.4.4 (2017-02-23)

### Bugfixes

- #673 Add close method to workbooks
- #762 openpyxl can create files with invalid style indices
- #729 Allow images in write-only mode
- #744 Rounded corners for charts
- #747 Use repr when handling non-convertible objects
- #764 Hashing function is incorrect
- #765 Named styles share underlying array

### Minor Changes

- Add roundtrip support for worksheet tables.

### Pull requests

- 160 Don’t init mimetypes more than once.

## 2.4.3 (unreleased)

bad release

## 2.4.2 (2017-01-31)

### Bug fixes

- #727 DeprecationWarning is incorrect
- #734 Exception raised if userName is missing
- #739 Always provide a date1904 attribute
- #740 Hashes should be stored as Base64
- #743 Print titles broken on sheetnames with spaces
- #748 Workbook breaks when active sheet is removed
- #754 Incorrect descriptor for Filter values
- #756 Potential XXE vulerability
- #758 Cannot create files with page breaks and charts
- #759 Problems with worksheets with commas in their titles

### Minor Changes

- Add unicode support for sheet name incrementation.

## 2.4.1 (2016-11-23)

### Bug fixes

- #643 Make checking for duplicate sheet titles case insensitive
- #647 Trouble handling LibreOffice files with named styles
- #687 Directly assigned new named styles always refer to “Normal”
- #690 Cannot parse print titles with multiple sheet names
- #691 Cannot work with macro files created by LibreOffice
- Prevent duplicate differential styles
- #694 Allow sheet titles longer than 31 characters
- #697 Cannot unset hyperlinks
- #699 Exception raised when format objects use cell references
- #703 Copy height and width when copying comments
- #705 Incorrect content type for VBA macros
- #707 IndexError raised in read-only mode when accessing individual cells
- #711 Files with external links become corrupted
- #715 Cannot read files containing macro sheets
- #717 Details from named styles not preserved when reading files
- #722 Remove broken Print Title and Print Area definitions

### Minor changes

- Add support for Python 3.6
- Correct documentation for headers and footers

### Deprecations

Worksheet methods get_named_range() and get_sqaured_range()

### Bug fixes

## 2.4.0 (2016-09-15)

### Bug fixes

- #652 Exception raised when epoch is 1904
- #642 Cannot handle unicode in headers and footers in Python 2
- #646 Cannot handle unicode sheetnames in Python 2
- #658 Chart styles, and axis units should not be 0
- #663 Strings in external workbooks not unicode

### Major changes

- Add support for builtin styles and include one for Pandas

### Minor changes

- Add a keep_links option to load_workbook. External links contain cached copies of the external workbooks. If these are big it can be advantageous to be able to disable them.
- Provide an example for using cell ranges in DataValidation.
- PR 138 - add copy support to comments.

## 2.4.0-b1 (2016-06-08)

### Minor changes

- Add an the alias hide_drop_down to DataValidation for showDropDown because that is how Excel works.

### Bug fixes

- #625 Exception raises when inspecting EmptyCells in read-only mode
- #547 Functions for handling OOXML “escaped” ST_XStrings
- #629 Row Dimensions not supported in write-only mode
- #530 Problems when removing worksheets with charts
- #630 Cannot use SheetProtection in write-only mode

### Features

- Add write support for worksheet tables

## 2.4.0-a1 (2016-04-11)

### Minor changes

- Remove deprecated methods from DataValidation
- Remove deprecated methods from PrintPageSetup
- Convert AutoFilter to Serialisable and extend support for filters
- Add support for SortState
- Removed use_iterators keyword when loading workbooks. Use read_only instead.
- Removed optimized_write keyword for new workbooks. Use write_only instead.
- Improve print title support
- Add print area support
- New implementation of defined names
- New implementation of page headers and footers
- Add support for Python’s NaN
- Added iter_cols method for worksheets
- ws.rows and ws.columns now always return generators and start at the top of the worksheet
- Add a values property for worksheets
- Default column width changed to 8 as per the specification

### Deprecations

- Cell anchor method
- Worksheet point_pos method
- Worksheet add_print_title method
- Worksheet HeaderFooter attribute, replaced by individual ones
- Flatten function for cells
- Workbook get_named_range, add_named_range, remove_named_range, get_sheet_names, get_sheet_by_name
- Comment text attribute
- Use of range strings deprecated for ws.iter_rows()
- Use of coordinates deprecated for ws.cell()
- Deprecate .copy() method for StyleProxy objects

### Bug fixes

- #152 Hyperlinks lost when reading files
- #171 Add function for copying worksheets
- #386 Cells with inline strings considered empty
- #397 Add support for ranges of rows and columns
- #446 Workbook with definedNames corrupted by openpyxl
- #481 “safe” reserved ranges are not read from workbooks
- #501 Discarding named ranges can lead to corrupt files
- #574 Exception raised when using the class method to parse Relationships
- #579 Crashes when reading defined names with no content
- #597 Cannot read worksheets without coordinates
- #617 Customised named styles not correctly preserved

## 2.3.5 (2016-04-11)

### Bug fixes

- #618 Comments not written in write-only mode

## 2.3.4 (2016-03-16)

### Bug fixes

- #594 Content types might be missing when keeping VBA
- #599 Cells with only one cell look empty
- #607 Serialise NaN as ‘’

### Minor changes

- Preserve the order of external references because formualae use numerical indices.
- Typo corrected in cell unit tests (PR 118)

## 2.3.3 (2016-01-18)

### Bug fixes

- #540 Cannot read merged cells in read-only mode
- #565 Empty styled text blocks cannot be parsed
- #569 Issue warning rather than raise Exception raised for unparsable definedNames
- #575 Cannot open workbooks with embdedded OLE files
- #584 Exception when saving borders with attributes

### Minor changes

- PR 103 Documentation about chart scaling and axis limits
- Raise an exception when trying to copy cells from other workbooks.

## 2.3.2 (2015-12-07)

### Bug fixes

- #554 Cannot add comments to a worksheet when preserving VBA
- #561 Exception when reading phonetic text
- #562 DARKBLUE is the same as RED
- #563 Minimum for row and column indexes not enforced

### Minor changes

- PR 97 One VML file per worksheet.
- PR 96 Correct descriptor for CharacterProperties.rtl
- #498 Metadata is not essential to use the package.

## 2.3.1 (2015-11-20)

### Bug fixes

- #534 Exception when using columns property in read-only mode.
- #536 Incorrectly handle comments from Google Docs files.
- #539 Flexible value types for conditional formatting.
- #542 Missing content types for images.
- #543 Make sure images fit containers on all OSes.
- #544 Gracefully handle missing cell styles.
- #546 ExternalLink duplicated when editing a file with macros.
- #548 Exception with non-ASCII worksheet titles
- #551 Combine multiple LineCharts

### Minor changes

- PR 88 Fix page margins in parser.

## 2.3.0 (2015-10-20)

### Major changes

- Support the creation of chartsheets

### Bug fixes

- #532 Problems when cells have no style in read-only mode.

### Minor changes

- PR 79 Make PlotArea editable in charts
- Use graphicalProperties as the alias for spPr

## 2.3.0-b2 (2015-09-04)

### Bug fixes

- #488 Support hashValue attribute for sheetProtection
- #493 Warn that unsupported extensions will be dropped
- #494 Cells with exponentials causes a ValueError
- #497 Scatter charts are broken
- #499 Inconsistent conversion of localised datetimes
- #500 Adding images leads to unreadable files
- #509 Improve handling of sheet names
- #515 Non-ascii titles have bad repr
- #516 Ignore unassigned worksheets

### Minor changes

- Worksheets are now iterable by row.
- Assign individual cell styles only if they are explicitly set.

## 2.3.0-b1 (2015-06-29)

### Major changes

- Shift to using (row, column) indexing for cells. Cells will at some point lose coordinates.
- New implementation of conditional formatting. Databars now partially preserved.
- et_xmlfile is now a standalone library.
- Complete rewrite of chart package
- Include a tokenizer for fomulae to be able to adjust cell references in them. PR 63

### Minor changes

- Read-only and write-only worksheets renamed.
- Write-only workbooks support charts and images.
- PR76 Prevent comment images from conflicting with VBA

### Bug fixes

- #81 Support stacked bar charts
- #88 Charts break hyperlinks
- #97 Pie and combination charts
- #99 Quote worksheet names in chart references
- #150 Support additional chart options
- #172 Support surface charts
- #381 Preserve named styles
- #470 Adding more than 10 worksheets with the same name leads to duplicates sheet names and an invalid file

## 2.2.6 (unreleased)

### Bug fixes

- #502 Unexpected keyword “mergeCell”
- #503 tostring missing in dump_worksheet
- #506 Non-ASCII formulae cannot be parsed
- #508 Cannot save files with coloured tabs
- Regex for ignoring named ranges is wrong (character class instead of prefix)

## 2.2.5 (2015-06-29)

### Bug fixes

- #463 Unexpected keyword “mergeCell”
- #484 Unusual dimensions breaks read-only mode
- #485 Move return out of loop

## 2.2.4 (2015-06-17)

### Bug fixes

- #464 Cannot use images when preserving macros
- #465 ws.cell() returns an empty cell on read-only workbooks
- #467 Cannot edit a file with ActiveX components
- #471 Sheet properties elements must be in order
- #475 Do not redefine class __slots__ in subclasses
- #477 Write-only support for SheetProtection
- #478 Write-only support for DataValidation
- Improved regex when checking for datetime formats

## 2.2.3 (2015-05-26)

### Bug fixes

- #451 fitToPage setting ignored
- #458 Trailing spaces lost when saving files.
- #459 setup.py install fails with Python 3
- #462 Vestigial rId conflicts when adding charts, images or comments
- #455 Enable Zip64 extensions for all versions of Python

## 2.2.2 (2015-04-28)

### Bug fixes

- #447 Uppercase datetime number formats not recognised.
- #453 Borders broken in shared_styles.

## 2.2.1 (2015-03-31)

### Minor changes

- PR54 Improved precision on times near midnight.
- PR55 Preserve macro buttons

### Bug fixes

- #429 Workbook fails to load because header and footers cannot be parsed.
- #433 File-like object with encoding=None
- #434 SyntaxError when writing page breaks.
- #436 Read-only mode duplicates empty rows.
- #437 Cell.offset raises an exception
- #438 Cells with pivotButton and quotePrefix styles cannot be read
- #440 Error when customised versions of builtin formats
- #442 Exception raised when a fill element contains no children
- #444 Styles cannot be copied

## 2.2.0 (2015-03-11)

### Bug fixes

- #415 Improved exception when passing in invalid in memory files.

## 2.2.0-b1 (2015-02-18)

### Major changes

- Cell styles deprecated, use formatting objects (fonts, fills, borders, etc.) directly instead
- Charts will no longer try and calculate axes by default
- Support for template file types - PR21
- Moved ancillary functions and classes into utils package - single place of reference
- PR 34 Fully support page setup
- Removed SAX-based XML Generator. Special thanks to Elias Rabel for implementing xmlfile for xml.etree
- Preserve sheet view definitions in existing files (frozen panes, zoom, etc.)

### Bug fixes

- #103 Set the zoom of a sheet
- #199 Hide gridlines
- #215 Preserve sheet view setings
- #262 Set the zoom of a sheet
- #392 Worksheet header not read
- #387 Cannot read files without styles.xml
- #410 Exception when preserving whitespace in strings
- #417 Cannot create print titles
- #420 Rename confusing constants
- #422 Preserve color index in a workbook if it differs from the standard

### Minor changes

- Use a 2-way cache for column index lookups
- Clean up tests in cells
- PR 40 Support frozen panes and autofilter in write-only mode
- Use ws.calculate_dimension(force=True) in read-only mode for unsized worksheets

## 2.1.5 (2015-02-18)

### Bug fixes

- #403 Cannot add comments in write-only mode
- #401 Creating cells in an empty row raises an exception
- #408 from_excel adjustment for Julian dates 1 < x < 60
- #409 refersTo is an optional attribute

### Minor changes

- Allow cells to be appended to standard worksheets for code compatibility with write-only mode.

## 2.1.4 (2014-12-16)

### Bug fixes

- #393 IterableWorksheet skips empty cells in rows
- #394 Date format is applied to all columns (while only first column contains dates)
- #395 temporary files not cleaned properly
- #396 Cannot write “=” in Excel file
- #398 Cannot write empty rows in write-only mode with LXML installed

### Minor changes

- Add relation namespace to root element for compatibility with iWork
- Serialize comments relation in LXML-backend

## 2.1.3 (2014-12-09)

### Minor changes

- PR 31 Correct tutorial
- PR 32 See #380
- PR 37 Bind worksheet to ColumnDimension objects

### Bug fixes

- #379 ws.append() doesn’t set RowDimension Correctly
- #380 empty cells formatted as datetimes raise exceptions

## 2.1.2 (2014-10-23)

### Minor changes

- PR 30 Fix regex for positive exponentials
- PR 28 Fix for #328

### Bug fixes

- #120, #168 defined names with formulae raise exceptions, #292
- #328 ValueError when reading cells with hyperlinks
- #369 IndexError when reading definedNames
- #372 number_format not consistently applied from styles

## 2.1.1 (2014-10-08)

### Minor changes

- PR 20 Support different workbook code names
- Allow auto_axis keyword for ScatterCharts

### Bug fixes

- #332 Fills lost in ConditionalFormatting
- #360 Support value=”none” in attributes
- #363 Support undocumented value for textRotation
- #364 Preserve integers in read-only mode
- #366 Complete read support for DataValidation
- #367 Iterate over unsized worksheets

## 2.1.0 (2014-09-21)

### Major changes

- “read_only” and “write_only” new flags for workbooks
- Support for reading and writing worksheet protection
- Support for reading hidden rows
- Cells now manage their styles directly
- ColumnDimension and RowDimension object manage their styles directly
- Use xmlfile for writing worksheets if available - around 3 times faster
- Datavalidation now part of the worksheet package

### Minor changes

- Number formats are now just strings
- Strings can be used for RGB and aRGB colours for Fonts, Fills and Borders
- Create all style tags in a single pass
- Performance improvement when appending rows
- Cleaner conversion of Python to Excel values
- PR6 reserve formatting for empty rows
- standard worksheets can append from ranges and generators

### Bug fixes

- #153 Cannot read visibility of sheets and rows
- #181 No content type for worksheets
- 241 Cannot read sheets with inline strings
- 322 1-indexing for merged cells
- 339 Correctly handle removal of cell protection
- 341 Cells with formulae do not round-trip
- 347 Read DataValidations
- 353 Support Defined Named Ranges to external workbooks

## 2.0.5 (2014-08-08)

### Bug fixes

- #348 incorrect casting of boolean strings
- #349 roundtripping cells with formulae

## 2.0.4 (2014-06-25)

### Minor changes

- Add a sample file illustrating colours

### Bug fixes

- #331 DARKYELLOW was incorrect
- Correctly handle extend attribute for fonts

## 2.0.3 (2014-05-22)

### Minor changes

- Updated docs

### Bug fixes

- #319 Cannot load Workbooks with vertAlign styling for fonts

## 2.0.2 (2014-05-13)

## 2.0.1 (2014-05-13) brown bag

## 2.0.0 (2014-05-13) brown bag

### Major changes

- This is last release that will support Python 3.2
- Cells are referenced with 1-indexing: A1 == cell(row=1, column=1)
- Use jdcal for more efficient and reliable conversion of datetimes
- Significant speed up when reading files
- Merged immutable styles
- Type inference is disabled by default
- RawCell renamed ReadOnlyCell
- ReadOnlyCell.internal_value and ReadOnlyCell.value now behave the same as Cell
- Provide no size information on unsized worksheets
- Lower memory footprint when reading files

### Minor changes

- All tests converted to pytest
- Pyflakes used for static code analysis
- Sample code in the documentation is automatically run
- Support GradientFills
- BaseColWidth set

### Pull requests

- #70 Add filterColumn, sortCondition support to AutoFilter
- #80 Reorder worksheets parts
- #82 Update API for conditional formatting
- #87 Add support for writing Protection styles, others
- #89 Better handling of content types when preserving macros

### Bug fixes

- #46 ColumnDimension style error
- #86 reader.worksheet.fast_parse sets booleans to integers
- #98 Auto sizing column widths does not work
- #137 Workbooks with chartsheets
- #185 Invalid PageMargins
- #230 Using v in cells creates invalid files
- #243 - IndexError when loading workbook
- #263 - Forded conversion of line breaks
- #267 - Raise exceptions when passed invalid types
- #270 - Cannot open files which use non-standard sheet names or reference Ids
- #269 - Handling unsized worksheets in IterableWorksheet
- #270 - Handling Workbooks with non-standard references
- #275 - Handling auto filters where there are only custom filters
- #277 - Harmonise chart and cell coordinates
- #280- Explicit exception raising for invalid characters
- #286 - Optimized writer can not handle a datetime.time value
- #296 - Cell coordinates not consistent with documentation
- #300 - Missing column width causes load_workbook() exception
- #304 - Handling Workbooks with absolute paths for worksheets (from Sharepoint)

## 1.8.6 (2014-05-05)

### Minor changes

Fixed typo for import Elementtree

### Bugfixes

- #279 Incorrect path for comments files on Windows

## 1.8.5 (2014-03-25)

### Minor changes

- The ‘=’ string is no longer interpreted as a formula
- When a client writes empty xml tags for cells (e.g. <c r=’A1’></c>), reader will not crash

## 1.8.4 (2014-02-25)

### Bugfixes

- #260 better handling of undimensioned worksheets
- #268 non-ascii in formualae
- #282 correct implementation of register_namepsace for Python 2.6

## 1.8.3 (2014-02-09)

### Major changes

Always parse using cElementTree

### Minor changes

Slight improvements in memory use when parsing

- #256 - error when trying to read comments with optimised reader
- #260 - unsized worksheets
- #264 - only numeric cells can be dates

## 1.8.2 (2014-01-17)

- #247 - iterable worksheets open too many files
- #252 - improved handling of lxml
- #253 - better handling of unique sheetnames

## 1.8.1 (2014-01-14)

- #246

## 1.8.0 (2014-01-08)

### Compatibility

Support for Python 2.5 dropped.

### Major changes

- Support conditional formatting
- Support lxml as backend
- Support reading and writing comments
- pytest as testrunner now required
- Improvements in charts: new types, more reliable

### Minor changes

- load_workbook now accepts data_only to allow extracting values only from formulae. Default is false.
- Images can now be anchored to cells
- Docs updated
- Provisional benchmarking
- Added convenience methods for accessing worksheets and cells by key

## 1.7.0 (2013-10-31)

### Major changes

Drops support for Python < 2.5 and last version to support Python 2.5

### Compatibility

Tests run on Python 2.5, 2.6, 2.7, 3.2, 3.3

### Merged pull requests

- 27 Include more metadata
- 41 Able to read files with chart sheets
- 45 Configurable Worksheet classes
- 3 Correct serialisation of Decimal
- 36 Preserve VBA macros when reading files
- 44 Handle empty oddheader and oddFooter tags
- 43 Fixed issue that the reader never set the active sheet
- 33 Reader set value and type explicitly and TYPE_ERROR checking
- 22 added page breaks, fixed formula serialization
- 39 Fix Python 2.6 compatibility
- 47 Improvements in styling

### Known bugfixes

- #109
- #165
- #209
- #112
- #166
- #109
- #223
- #124
- #157

### Miscellaneous

Performance improvements in optimised writer

Docs updated

Read the Docs v: 3.0

Versions
  latest
  stable
  3.1
  3.0
  2.6
  2.5.14
  2.5
  2.4

Downloads

On Read the Docs
  Project Home
  Builds

Free document hosting provided by Read the Docs.