openpyxl merge requestshttps://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests2019-02-10T19:35:55Zhttps://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/321Fix incorrect class path for WriteOnlyCell in docs2019-02-10T19:35:55ZBitbucket ImporterFix incorrect class path for WriteOnlyCell in docs*Created originally on Bitbucket by [Jon Emord](https://bitbucket.org/%7B0e2e0f84-60a9-4a2e-a36b-87a2baa4fb57%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
The import a few lines down was ...*Created originally on Bitbucket by [Jon Emord](https://bitbucket.org/%7B0e2e0f84-60a9-4a2e-a36b-87a2baa4fb57%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
The import a few lines down was correct, so just needed to change this one instance.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/322Removed bool and byte from numeric types.2020-06-26T12:06:04ZBitbucket ImporterRemoved bool and byte from numeric types.*Created originally on Bitbucket by [CoryKramer (Cory Kramer)](https://bitbucket.org/%7Bb770e48f-bd38-468d-8272-9cf6671cbd8f%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
*Source changeset...*Created originally on Bitbucket by [CoryKramer (Cory Kramer)](https://bitbucket.org/%7Bb770e48f-bd38-468d-8272-9cf6671cbd8f%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
*Source changeset not longer availableat the time of import. Commit listwill look empty*
This is a follow-up to pull request #320.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/326manifest: use private mime type database2020-06-26T12:06:09ZBitbucket Importermanifest: use private mime type database*Created originally on Bitbucket by [Hans-Jakob (Hans-Jakob Holtz)](https://bitbucket.org/%7B2ddbb2a6-effc-4c15-afe5-6ce3d97095f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
manifest: us...*Created originally on Bitbucket by [Hans-Jakob (Hans-Jakob Holtz)](https://bitbucket.org/%7B2ddbb2a6-effc-4c15-afe5-6ce3d97095f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
manifest: use private mime type database
This fixes [#1221](https://bitbucket.org/openpyxl/openpyxl/issues/1221/openpyxl-creates-broken-files-if)
The private mime database starts out as a copy of the global mime database.
In particular, it contains all well-known types like image/jpeg and image/png.
We add/overwrite our own types into that database instead of the global one.
This private database is immune to subsequent changes to the global mime
database, such as mimetypes.init\(\) or conflicting add\_type\(...\) calls.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/327AttributeError: 'MergedCell' object attribute 'hyperlink' is read-only2020-06-26T12:06:10ZBitbucket ImporterAttributeError: 'MergedCell' object attribute 'hyperlink' is read-only*Created originally on Bitbucket by [Dmitry Ferens (Dmitriy Ferens)](https://bitbucket.org/%7Bd6596ef0-4c26-46b6-a86e-64967ef1cd0c%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Hi,
I fo...*Created originally on Bitbucket by [Dmitry Ferens (Dmitriy Ferens)](https://bitbucket.org/%7Bd6596ef0-4c26-46b6-a86e-64967ef1cd0c%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Hi,
I found that `openpyxl` fails to load spreadsheets, which contains links which made on merged cells.
Example: [bugfix-merged-link.xlsx](https://www.dropbox.com/s/eothoiuchs1xjc7/bugfix-merged-link.xlsx?dl=1)
Traceback:
```plaintext
File "my-project.py", line 16, in get_spreadsheet
wb = openpyxl.load_workbook(file_path)
File "site-packages/openpyxl/reader/excel.py", line 312, in load_workbook
reader.read()
File "site-packages/openpyxl/reader/excel.py", line 274, in read
self.read_worksheets()
File "site-packages/openpyxl/reader/excel.py", line 228, in read_worksheets
ws_parser.bind_all()
File "site-packages/openpyxl/worksheet/_reader.py", line 403, in bind_all
self.bind_hyperlinks()
File "site-packages/openpyxl/worksheet/_reader.py", line 369, in bind_hyperlinks
cell.hyperlink = link
AttributeError: 'MergedCell' object attribute 'hyperlink' is read-only
```
It fails to set an attribute on a `MergedCell` instance, on second loop iteration:
```
cell = <MergedCell 'Sheet'.B18>
link = <openpyxl.worksheet.hyperlink.Hyperlink object>
Parameters:
ref='A18', location=None, tooltip=None, display='http://test.com', id=None
rel = <openpyxl.packaging.relationship.Relationship object>
Parameters:
Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', Target='../', TargetMode=None, Id='rId1'
row = (<Cell 'Sheet'.A18>, <MergedCell 'Sheet'.B18>)
```
A proposed fix is to remove that loop completely. I checked coverage and I found that tests never check such case \(row has always 1 cell\):
![](https://bitbucket.org/repo/9prEM5g/images/3918590380-no-coverage.png)
I added a possible test improvement and a possible solution, could you please take a look?
Dmitryhttps://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/330Copy page margins, setup, print options when copying worksheet2020-06-26T12:06:14ZBitbucket ImporterCopy page margins, setup, print options when copying worksheet*Created originally on Bitbucket by [johnwoltman (John Woltman)](https://bitbucket.org/%7B4d24c01c-16ec-4aab-8693-5495a7e2acd6%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
WorksheetCopy c...*Created originally on Bitbucket by [johnwoltman (John Woltman)](https://bitbucket.org/%7B4d24c01c-16ec-4aab-8693-5495a7e2acd6%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
WorksheetCopy class now copies the PageMargins, PrintPageSetup, and PrintOptions. Fixes #1244.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/334Fix hard-coded qualified attribute value.2020-06-26T12:06:18ZBitbucket ImporterFix hard-coded qualified attribute value.*Created originally on Bitbucket by [Carsten Byrman](https://bitbucket.org/%7B63ac54f6-5f60-4435-b241-d46cc982a928%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
*Source changeset not longe...*Created originally on Bitbucket by [Carsten Byrman](https://bitbucket.org/%7B63ac54f6-5f60-4435-b241-d46cc982a928%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
*Source changeset not longer availableat the time of import. Commit listwill look empty*
2nd attempt. Still needs a test though.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/339protection.rst edited online with Bitbucket2020-06-26T12:06:24ZBitbucket Importerprotection.rst edited online with Bitbucket*Created originally on Bitbucket by [jlice](https://bitbucket.org/%7B501ce6b1-953b-4b67-8a79-65b9ddecd008%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
protection.rst edited online with Bi...*Created originally on Bitbucket by [jlice](https://bitbucket.org/%7B501ce6b1-953b-4b67-8a79-65b9ddecd008%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
protection.rst edited online with Bitbucket
fix erros on branch 2.6https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/342Drastically increase performance on deleting large amounts of rows/cols2019-06-24T08:26:42ZBitbucket ImporterDrastically increase performance on deleting large amounts of rows/cols*Created originally on Bitbucket by [René Neumann](https://bitbucket.org/%7B1d9b1f1d-0d9b-4b3c-bb96-e58f2d5b3ba7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Drastically increase performa...*Created originally on Bitbucket by [René Neumann](https://bitbucket.org/%7B1d9b1f1d-0d9b-4b3c-bb96-e58f2d5b3ba7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Drastically increase performance on deleting large amounts of rows.
Currently, min and max column are calculated once for each row to be deleted. And this calculation needs to iterate over every cell. Deleting lots of rows \(say 19k of 75k rows in total\) thus can take hours \(sic!\). After this patch, a couple seconds are sufficient.
\(This is a redo of pull request #341, because I couldn’t update that one to use the correct branch\)https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/344Fix named-style defaulting a non-custom number format to 'General'2020-06-26T12:06:34ZBitbucket ImporterFix named-style defaulting a non-custom number format to 'General'*Created originally on Bitbucket by [stephenrauch (Stephen Rauch)](https://bitbucket.org/%7B09c6e4a1-d2c7-47c0-8afc-08bba22f4b59%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
*Created originally on Bitbucket by [stephenrauch (Stephen Rauch)](https://bitbucket.org/%7B09c6e4a1-d2c7-47c0-8afc-08bba22f4b59%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/349Document creating global and local named ranges2020-06-26T12:06:44ZBitbucket ImporterDocument creating global and local named ranges*Created originally on Bitbucket by [Tristan Stenner](https://bitbucket.org/%7Bf0c10582-48ae-49d7-9cd7-fb141eda854f%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Add an example showing how...*Created originally on Bitbucket by [Tristan Stenner](https://bitbucket.org/%7Bf0c10582-48ae-49d7-9cd7-fb141eda854f%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Add an example showing how to create global and local named rangeshttps://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/350make worksheet to DataFrame example reproducable2020-06-26T12:06:46ZBitbucket Importermake worksheet to DataFrame example reproducable*Created originally on Bitbucket by [Matthew Davis](https://bitbucket.org/%7Bb9bce273-fc47-4ecd-bda3-b30acd01e61f%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
I was not able to run this e...*Created originally on Bitbucket by [Matthew Davis](https://bitbucket.org/%7Bb9bce273-fc47-4ecd-bda3-b30acd01e61f%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
I was not able to run this example when I tried. What is `islice`? I have never heard of it before, and couldn’t find any other mention of it on this page. I actually struggled to find any mention of it anywhere else. So it I think adding the import explicitly is very useful.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/352Fixed a bug in TableStyle child (field) tableStyleElement2020-06-26T12:06:50ZBitbucket ImporterFixed a bug in TableStyle child (field) tableStyleElement*Created originally on Bitbucket by [Riccardo Gusmeroli](https://bitbucket.org/%7Bd8630463-9f5d-4a3f-afa6-284d348ff603%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
*Source changeset not l...*Created originally on Bitbucket by [Riccardo Gusmeroli](https://bitbucket.org/%7Bd8630463-9f5d-4a3f-afa6-284d348ff603%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
*Source changeset not longer availableat the time of import. Commit listwill look empty*
Type of field TableStyle.tableStyleElement changed from _Typed_ to _Sequence_.
Prior to this change, custom TableStyle preserved **only one** of the style definitions “_Elements_” upon saving.
Bug can be reproduced by the following code:
```python
import openpyxl
wb=openpyxl.load_workbook('f1.xlsx')
wb.save('f2.xlsx')
```
where `f1.xlsx` contains a CUSTOM table style definitiion with MORE THAN 1 detail \(e,g, both wholeTable and headerRow customizations\)
See Ecma TC45 - 15.26.2.499 tableStyleElement - **Sequence** of table style element definitions.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/354Fix bug that prevents loading of charts without series2020-06-26T12:06:52ZBitbucket ImporterFix bug that prevents loading of charts without series*Created originally on Bitbucket by [Eiríkur Torfason](https://bitbucket.org/%7B7fba2020-182b-4996-952d-75b45da662f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Fixes issue [#1250](https...*Created originally on Bitbucket by [Eiríkur Torfason](https://bitbucket.org/%7B7fba2020-182b-4996-952d-75b45da662f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Fixes issue [#1250](https://bitbucket.org/openpyxl/openpyxl/issues/1250/valueerror-min-arg-is-an-empty-sequence) and adds a test to verify the fix.
I’ve run the tox tests locally with interpreters for 3.6, 3.7 and 3.8.
I’m new to Bitbucket. I’m not certain that I was successful in enabling pipelines for the forked repo…https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/356Handle missing r attributes in rows and cells.2020-06-26T12:06:55ZBitbucket ImporterHandle missing r attributes in rows and cells.*Created originally on Bitbucket by [Patrik Simons](https://bitbucket.org/%7Ba9e79e66-ff9e-4b9d-9be4-6f45a9073ab0%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Bugfixes should be based on ...*Created originally on Bitbucket by [Patrik Simons](https://bitbucket.org/%7Ba9e79e66-ff9e-4b9d-9be4-6f45a9073ab0%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Bugfixes should be based on the current production branch and new features on the development branch. If in doubt send an e-mail to me or the mailing list.
Pull requests without tests, and unit tests are preferred over functional tests, will not be accepted. Please check the development documentation on how to set up testing. Also, please configure pipelines for your account so that your pull request will run through the test matrix.
If you're adding new features then please consider extending the documentation.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/358Fix some grammar and spelling2019-11-20T19:47:26ZBitbucket ImporterFix some grammar and spelling*Created originally on Bitbucket by [Scott Noyes](https://bitbucket.org/%7B0d26d3bf-9668-4aa7-848b-e22d7cd1f562%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Fix some grammar and spelling*Created originally on Bitbucket by [Scott Noyes](https://bitbucket.org/%7B0d26d3bf-9668-4aa7-848b-e22d7cd1f562%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Fix some grammar and spellinghttps://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/359Fix grammar2020-06-26T12:07:01ZBitbucket ImporterFix grammar*Created originally on Bitbucket by [Scott Noyes](https://bitbucket.org/%7B0d26d3bf-9668-4aa7-848b-e22d7cd1f562%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Add missing words, delete some...*Created originally on Bitbucket by [Scott Noyes](https://bitbucket.org/%7B0d26d3bf-9668-4aa7-848b-e22d7cd1f562%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Add missing words, delete some duplicates, and fix punctuation and layout on several documentation pages.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/362Fix error when loading workbooks containing links that reference merged cells2020-06-26T12:07:05ZBitbucket ImporterFix error when loading workbooks containing links that reference merged cells*Created originally on Bitbucket by [Eiríkur Torfason](https://bitbucket.org/%7B7fba2020-182b-4996-952d-75b45da662f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
We at [GRID](https://www....*Created originally on Bitbucket by [Eiríkur Torfason](https://bitbucket.org/%7B7fba2020-182b-4996-952d-75b45da662f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
We at [GRID](https://www.grid.is/) have come across .xlsx files that fail to load due to the issue described in [#1260](https://bitbucket.org/openpyxl/openpyxl/issues/1260/)
This PR attempts to fix the issue.
* In `bind_hyperlinks`, check if `ref` points to a MergedCell. If so, place link on the top-left cell of the merged range.
* Extend `test_merged_hyperlinks` by adding a hyperlink pointing to a merged cell in `complex-styles-worksheet.xml`, then asserting that the link is placed on the top-left cell.
Locally, the tox tests are green across the board except for the pypy3 target that fails while installing dependencies.https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/363Accept cfvo values that are neither numbers nor cell references2020-06-26T12:07:07ZBitbucket ImporterAccept cfvo values that are neither numbers nor cell references*Created originally on Bitbucket by [Eiríkur Torfason](https://bitbucket.org/%7B7fba2020-182b-4996-952d-75b45da662f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Microsoft Excel and Googl...*Created originally on Bitbucket by [Eiríkur Torfason](https://bitbucket.org/%7B7fba2020-182b-4996-952d-75b45da662f7%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Microsoft Excel and Google Sheets will allow users to enter nonsensical strings as values for number, percent and percentile values for colorscales. This change makes it possible to load
workbooks, even if they contain bad conditional formatting values.
Fixes [#1385](https://bitbucket.org/openpyxl/openpyxl/issues/1385/typeerror-when-loading-conditional)https://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/365Fix SyntaxWarning with python 3.8 due to using "is" in a literal comparison2019-12-16T18:38:47ZBitbucket ImporterFix SyntaxWarning with python 3.8 due to using "is" in a literal comparison*Created originally on Bitbucket by [aerostitch](https://bitbucket.org/%7B1146196c-b06e-42f7-bf7a-929fec755afe%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Hi,
This PR fixes a SyntaxWa...*Created originally on Bitbucket by [aerostitch](https://bitbucket.org/%7B1146196c-b06e-42f7-bf7a-929fec755afe%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Hi,
This PR fixes a SyntaxWarning you get when running openpyxl with python 3.8 due to using "is" in a literal comparison
The warning was:
```
SyntaxWarning: "is" with a literal. Did you mean "=="?
```
Thanks,
Josephhttps://foss.heptapod.net/openpyxl/openpyxl/-/merge_requests/368Document end of Python 3.5 support in changelog.2020-02-04T10:08:53ZBitbucket ImporterDocument end of Python 3.5 support in changelog.*Created originally on Bitbucket by [martey (Martey Dodoo)](https://bitbucket.org/%7Be1c77263-0ee8-486b-ba38-929dfe7e8f57%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Update changelog to ...*Created originally on Bitbucket by [martey (Martey Dodoo)](https://bitbucket.org/%7Be1c77263-0ee8-486b-ba38-929dfe7e8f57%7D/)*
*Was already merged in Bitbucket before import, marked as merged by the import user*
Update changelog to make it clearer that version 2.6.4 is the last version that supports Python 3.5, and that 3.x.x only supports Python 3.6 and above. This should reduce confusion for users still on Python 3.5 \(see #1364 and #1402\).