Skip to content

Commit dcaa401

Browse files
committed
Fork of openpyxl=3.0.9
0 parents  commit dcaa401

File tree

617 files changed

+76447
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

617 files changed

+76447
-0
lines changed

AUTHORS.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
This project was started by Eric Gazoni. In 2013 Charlie Clark became
2+
co-maintainer of the project.
3+
4+
It was initially *heavily* inspired by the PHPExcel library:
5+
http://www.phpexcel.net/
6+
7+
Thanks to all those who participate in the project (in alphabetical order):
8+
9+
* aceMueller
10+
* Adam Lofts
11+
* Adam Morris
12+
* Alessandro Cucci
13+
* Alex Gronholm
14+
* Alexandre Fayolle
15+
* Amin Mirzaee
16+
* Anders Chrigstrom
17+
* Bernt R. Brenna
18+
* Brent Hoover
19+
* Brice Gelineau
20+
* ccoacley
21+
* Chi Ho Kwok
22+
* Cory Kramer
23+
* Day Barr
24+
* Detlef Lannert
25+
* Dieter Vandenbussche
26+
* Dmitriy Chernyshov
27+
* Dominik Geldmacher
28+
* Don Freeman
29+
* Eirikur Fannar Torfason
30+
* Elias Rabel
31+
* Eric Chlebek
32+
* Eric Gazoni
33+
* Eric Hurkman
34+
* Etienne Desautels
35+
* Felipe Ochoa
36+
* Felix Siebeneicker
37+
* Fumito Hamamura
38+
* Gabi Nagy
39+
* Gar Thompson
40+
* Gerald Van Huffelen
41+
* Greg Lehmann
42+
* Heikki Junes
43+
* Israel Barth Rubio
44+
* Jacob Middag
45+
* James Smagala
46+
* JarekPS
47+
* Jean Pierre Huart
48+
* Jeff Holman
49+
* John Woltman IV
50+
* Jonathan Peirce
51+
* Joseph Tate
52+
* Josh Haywood
53+
* Jun Omae
54+
* Kay Webber
55+
* Khchine Hamza
56+
* Klaus Bremer
57+
* Koert van der Veer
58+
* Laurent Laporte
59+
* Laurent Vasseur
60+
* Maarten De Paepe
61+
* Magnus Schieder
62+
* Mark Gemmill
63+
* Marko Loparic
64+
* Masato Yoshida
65+
* Max Bolingbroke
66+
* Nicholas Laver
67+
* Nis Martensen
68+
* Paul Joyce
69+
* Paul Van Der Linden
70+
* Philip Roche
71+
* ramn_se
72+
* René Neumann
73+
* Rick Rankin
74+
* Samuel Loretan
75+
* Sergey Pikhovkin
76+
* Shekhar Gyanwali
77+
* Shibukawa Yoshiki
78+
* Stefan Behnel
79+
* Stephane Bard
80+
* Stephen Rauch
81+
* Sven Burk
82+
* Ted Pollari
83+
* Thomas Nygards
84+
* Victor Korobkovsky
85+
* Waldemar Osuch
86+
* Wojciech Rola
87+
* Wolfgane Scherer
88+
* Yaroslav Halchenko
89+
* Yash Jhunjhunwala
90+
* Yingjie Lan
91+
* Leetao
92+
93+
Project logo designed by Eric Gazoni, font by claudeserieux
94+
(http://www.dafont.com/profile.php?user=337503)

CONTRIBUTING.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Contributing
2+
============
3+
4+
Contributions to openpyxl are welcome.
5+
Please see the [developer documentation](https://openpyxl.readthedocs.io/en/stable/development.html)
6+
for further information.

LICENCE.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This software is under the MIT Licence
2+
======================================
3+
4+
Copyright (c) 2010 openpyxl
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a
7+
copy of this software and associated documentation files (the
8+
"Software"), to deal in the Software without restriction, including
9+
without limitation the rights to use, copy, modify, merge, publish,
10+
distribute, sublicense, and/or sell copies of the Software, and to
11+
permit persons to whom the Software is furnished to do so, subject to
12+
the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included
15+
in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MANIFEST.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
prune openpyxl/sample
2+
prune openpyxl/benchmarks
3+
prune openpyxl/develop
4+
prune scratchpad
5+
prune doc
6+
7+
include *.rst

README.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.. image:: https://coveralls.io/repos/bitbucket/openpyxl/openpyxl/badge.svg?branch=default
2+
:target: https://coveralls.io/bitbucket/openpyxl/openpyxl?branch=default
3+
:alt: coverage status
4+
5+
Introduction
6+
------------
7+
8+
openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.
9+
10+
It was born from lack of existing library to read/write natively from Python
11+
the Office Open XML format.
12+
13+
All kudos to the PHPExcel team as openpyxl was initially based on PHPExcel.
14+
15+
16+
Security
17+
--------
18+
19+
By default openpyxl does not guard against quadratic blowup or billion laughs
20+
xml attacks. To guard against these attacks install defusedxml.
21+
22+
Mailing List
23+
------------
24+
25+
The user list can be found on http://groups.google.com/group/openpyxl-users
26+
27+
28+
Sample code::
29+
30+
from openpyxl import Workbook
31+
wb = Workbook()
32+
33+
# grab the active worksheet
34+
ws = wb.active
35+
36+
# Data can be assigned directly to cells
37+
ws['A1'] = 42
38+
39+
# Rows can also be appended
40+
ws.append([1, 2, 3])
41+
42+
# Python types will automatically be converted
43+
import datetime
44+
ws['A2'] = datetime.datetime.now()
45+
46+
# Save the file
47+
wb.save("sample.xlsx")
48+
49+
50+
Documentation
51+
-------------
52+
53+
The documentation is at: https://openpyxl.readthedocs.io
54+
55+
* installation methods
56+
* code examples
57+
* instructions for contributing
58+
59+
Release notes: https://openpyxl.readthedocs.io/en/stable/changes.html

bitbucket-pipelines.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
image: openpyxl/openpyxl-ci
2+
3+
pipelines:
4+
pull-requests:
5+
'**':
6+
- step:
7+
caches:
8+
- pip
9+
script:
10+
- /tools/clean-launch.sh tox --skip-missing-interpreters -e py27,py37 -- -qrf
11+
default:
12+
- step:
13+
caches:
14+
- pip
15+
script:
16+
- /tools/clean-launch.sh tox --skip-missing-interpreters -- -qrf
17+
- export GIT_ID=$(hg tip --template '{node}\n')
18+
- export GIT_AUTHOR_NAME=$(hg tip --template '{author|person}\n')
19+
- export GIT_AUTHOR_EMAIL=$(hg tip --template '{author|email}\n')
20+
- export GIT_COMMITTER_NAME=$(hg tip --template '{author|person}\n')
21+
- export GIT_COMMITTER_EMAIL=$(hg tip --template '{author|email}\n')
22+
- export GIT_MESSAGE=$(hg tip --template '{desc}\n')
23+
- export GIT_BRANCH=$(hg branch)
24+
- export GIT_URL=https://bitbucket.org/openpyxl/openpyxl
25+
# - /tools/clean-launch.sh tox -e cov

conftest.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright (c) 2010-2021 openpyxl
2+
3+
import pytest
4+
import platform
5+
6+
### Markers ###
7+
8+
9+
def pytest_runtest_setup(item):
10+
from openpyxl import DEFUSEDXML, LXML
11+
if isinstance(item, pytest.Function):
12+
try:
13+
from PIL import Image
14+
except ImportError:
15+
Image = False
16+
if item.get_closest_marker("pil_required") and Image is False:
17+
pytest.skip("PIL must be installed")
18+
elif item.get_closest_marker("pil_not_installed") and Image:
19+
pytest.skip("PIL is installed")
20+
elif item.get_closest_marker("not_py33"):
21+
pytest.skip("Ordering is not a given in Python 3")
22+
elif item.get_closest_marker("defusedxml_required"):
23+
if LXML or not DEFUSEDXML:
24+
pytest.skip("defusedxml is required to guard against these vulnerabilities")
25+
elif item.get_closest_marker("lxml_required"):
26+
if not LXML:
27+
pytest.skip("LXML is required for some features such as schema validation")
28+
elif item.get_closest_marker("lxml_buffering"):
29+
from lxml.etree import LIBXML_VERSION
30+
if LIBXML_VERSION < (3, 4, 0, 0):
31+
pytest.skip("LXML >= 3.4 is required")
32+
elif item.get_closest_marker("no_lxml"):
33+
from openpyxl import LXML
34+
if LXML:
35+
pytest.skip("LXML has a different interface")
36+
elif item.get_closest_marker("numpy_required"):
37+
from openpyxl import NUMPY
38+
if not NUMPY:
39+
pytest.skip("Numpy must be installed")
40+
elif item.get_closest_marker("pandas_required"):
41+
try:
42+
import pandas
43+
except ImportError as e:
44+
pytest.skip("Pandas must be installed")
45+
elif item.get_closest_marker("no_pypy"):
46+
if platform.python_implementation() == "PyPy":
47+
pytest.skip("Skipping pypy")
48+

doc/Makefile

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = build
9+
10+
# Internal variables.
11+
PAPEROPT_a4 = -D latex_paper_size=a4
12+
PAPEROPT_letter = -D latex_paper_size=letter
13+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
14+
15+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
16+
17+
help:
18+
@echo "Please use \`make <target>' where <target> is one of"
19+
@echo " html to make standalone HTML files"
20+
@echo " dirhtml to make HTML files named index.html in directories"
21+
@echo " singlehtml to make a single large HTML file"
22+
@echo " pickle to make pickle files"
23+
@echo " json to make JSON files"
24+
@echo " htmlhelp to make HTML files and a HTML help project"
25+
@echo " qthelp to make HTML files and a qthelp project"
26+
@echo " devhelp to make HTML files and a Devhelp project"
27+
@echo " epub to make an epub"
28+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
30+
@echo " text to make text files"
31+
@echo " man to make manual pages"
32+
@echo " changes to make an overview of all changed/added/deprecated items"
33+
@echo " linkcheck to check all external links for integrity"
34+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
35+
36+
clean:
37+
-rm -rf $(BUILDDIR)/*
38+
39+
html:
40+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
41+
@echo
42+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
43+
44+
dirhtml:
45+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
46+
@echo
47+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
48+
49+
singlehtml:
50+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
51+
@echo
52+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
53+
54+
pickle:
55+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
56+
@echo
57+
@echo "Build finished; now you can process the pickle files."
58+
59+
json:
60+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
61+
@echo
62+
@echo "Build finished; now you can process the JSON files."
63+
64+
htmlhelp:
65+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
66+
@echo
67+
@echo "Build finished; now you can run HTML Help Workshop with the" \
68+
".hhp project file in $(BUILDDIR)/htmlhelp."
69+
70+
qthelp:
71+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
72+
@echo
73+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
74+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
75+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openpyxl.qhcp"
76+
@echo "To view the help file:"
77+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openpyxl.qhc"
78+
79+
devhelp:
80+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
81+
@echo
82+
@echo "Build finished."
83+
@echo "To view the help file:"
84+
@echo "# mkdir -p $$HOME/.local/share/devhelp/openpyxl"
85+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openpyxl"
86+
@echo "# devhelp"
87+
88+
epub:
89+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
90+
@echo
91+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
92+
93+
latex:
94+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
95+
@echo
96+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
97+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
98+
"(use \`make latexpdf' here to do that automatically)."
99+
100+
latexpdf:
101+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
102+
@echo "Running LaTeX files through pdflatex..."
103+
make -C $(BUILDDIR)/latex all-pdf
104+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
105+
106+
text:
107+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
108+
@echo
109+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
110+
111+
man:
112+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
113+
@echo
114+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
115+
116+
changes:
117+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
118+
@echo
119+
@echo "The overview file is in $(BUILDDIR)/changes."
120+
121+
linkcheck:
122+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
123+
@echo
124+
@echo "Link check complete; look for any errors in the above output " \
125+
"or in $(BUILDDIR)/linkcheck/output.txt."
126+
127+
doctest:
128+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
129+
@echo "Testing of doctests in the sources finished, look at the " \
130+
"results in $(BUILDDIR)/doctest/output.txt."

doc/_static/.placeholder

Whitespace-only changes.

0 commit comments

Comments
 (0)