Skip to content

Allow for set and other unsubscriptable data structures. #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@


3 contributors
4 contributors
================================================================================

In alphabetical order:

* `Benoit Pierre <https://github.com/benoit-pierre>`_
* `Craig Anderson <https://github.com/craiga>`_
* `John Vandenberg <https://github.com/jayvdb>`_
* `Stephen J. Fuhry <https://github.com/fuhrysteve>`_
2 changes: 1 addition & 1 deletion pyexcel_xlsx/xlsxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, sheet, **keywords):
self.max_column = 0
self.__sheet_max_row = sheet.max_row
self.__sheet_max_column = sheet.max_column
for ranges in sheet.merged_cells.ranges[:]:
for ranges in list(sheet.merged_cells.ranges)[:]:
merged_cells = MergedCell(ranges)
merged_cells.register_cells(self.__merged_cells)
if self.max_row < merged_cells.bottom_row():
Expand Down
2 changes: 1 addition & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_reading_through_sheets(self):
expected = [[4, 4, 4, 4], [5, 5, 5, 5], [6, 6, 6, 6]]
assert data == expected
data = list(b["Sheet3"].rows())
expected = [[u"X", u"Y", u"Z"], [1, 4, 7], [2, 5, 8], [3, 6, 9]]
expected = [["X", "Y", "Z"], [1, 4, 7], [2, 5, 8], [3, 6, 9]]
assert data == expected
sheet3 = b["Sheet3"]
sheet3.name_columns_by_row(0)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_multiple_sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,6 @@ def _produce_ordered_dict():
data_dict.update({"Sheet1": [[1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3]]})
data_dict.update({"Sheet2": [[4, 4, 4, 4], [5, 5, 5, 5], [6, 6, 6, 6]]})
data_dict.update(
{"Sheet3": [[u"X", u"Y", u"Z"], [1, 4, 7], [2, 5, 8], [3, 6, 9]]}
{"Sheet3": [["X", "Y", "Z"], [1, 4, 7], [2, 5, 8], [3, 6, 9]]}
)
return data_dict
8 changes: 4 additions & 4 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import os
from datetime import datetime, time
from datetime import time, datetime

from nose.tools import eq_
from pyexcel_xlsx import get_data
from pyexcel_io._compact import OrderedDict

from pyexcel_xlsx import get_data
from nose.tools import eq_


def test_reading():
data = get_data(
os.path.join("tests", "fixtures", "date_field.xlsx"),
library="pyexcel-xlsx",
skip_hidden_row_and_column=False
skip_hidden_row_and_column=False,
)
expected = OrderedDict()
expected.update(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_write_book(self):
self.content = {
"Sheet1": [[1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3]],
"Sheet2": [[4, 4, 4, 4], [5, 5, 5, 5], [6, 6, 6, 6]],
"Sheet3": [[u"X", u"Y", u"Z"], [1, 4, 7], [2, 5, 8], [3, 6, 9]],
"Sheet3": [["X", "Y", "Z"], [1, 4, 7], [2, 5, 8], [3, 6, 9]],
}
self.testfile = "writer.xlsx"
writer = Writer(self.testfile, "xlsx")
Expand Down