diff --git a/portable_spreadsheet/__init__.py b/portable_spreadsheet/__init__.py index 08d8e9c..24f61e8 100644 --- a/portable_spreadsheet/__init__.py +++ b/portable_spreadsheet/__init__.py @@ -7,5 +7,5 @@ from .grammar_utils import GrammarUtils # noqa from .skipped_label import SkippedLabel # noqa -__version__ = "2.1.7" +__version__ = "2.1.8" __status__ = "Production" diff --git a/portable_spreadsheet/serialization.py b/portable_spreadsheet/serialization.py index 0147419..fa544d9 100644 --- a/portable_spreadsheet/serialization.py +++ b/portable_spreadsheet/serialization.py @@ -604,24 +604,32 @@ def to_dictionary(self, x = [label.replace(' ', spaces_replacement) for label in self.cell_indices.columns_labels[ # Reflects the column offset for export - self.export_offset[1]:self.shape[1] + self.export_offset[1]:(self.export_offset[1] + + self.shape[1]) ] ] if (x_helptext := self.cell_indices.columns_help_text) is not None: # noqa # Reflects the column offset for export - x_helptext = x_helptext[self.export_offset[1]:self.shape[1]] + x_helptext = x_helptext[ + self.export_offset[1]:(self.export_offset[1] + + self.shape[1]) + ] x_start_key = 'columns' # The y-axes represents the rows y_range = self.shape[0] y = [label.replace(' ', spaces_replacement) for label in self.cell_indices.rows_labels[ # Reflects the row offset for export - self.export_offset[0]:self.shape[0] + self.export_offset[0]:(self.export_offset[0] + + self.shape[0]) ] ] if (y_helptext := self.cell_indices.rows_help_text) is not None: # noqa # Reflects the row offset for export - y_helptext = y_helptext[self.export_offset[0]:self.shape[0]] + y_helptext = y_helptext[ + self.export_offset[0]:(self.export_offset[0] + + self.shape[0]) + ] y_start_key = 'rows' # B) The x-axes represents the rows: @@ -629,24 +637,32 @@ def to_dictionary(self, x_range = self.shape[0] x = [label.replace(' ', spaces_replacement) for label in self.cell_indices.rows_labels[ - # Reflects the row offset for export - self.export_offset[0]:self.shape[0] - ] + # Reflects the row offset for export + self.export_offset[0]:(self.export_offset[0] + + self.shape[0]) + ] ] if (x_helptext := self.cell_indices.rows_help_text) is not None: # noqa # Reflects the row offset for export - x_helptext = x_helptext[self.export_offset[0]:self.shape[0]] + x_helptext = x_helptext[ + self.export_offset[0]:(self.export_offset[0] + + self.shape[0]) + ] x_start_key = 'rows' # The y-axes represents the columns y_range = self.shape[1] y = [label.replace(' ', spaces_replacement) for label in self.cell_indices.columns_labels[ # Reflects the column offset for export - self.export_offset[1]:self.shape[1] + self.export_offset[1]:(self.export_offset[1] + + self.shape[1]) ]] if (y_helptext := self.cell_indices.columns_help_text) is not None: # noqa # Reflects the column offset for export - y_helptext = y_helptext[self.export_offset[1]:self.shape[1]] + y_helptext = y_helptext[ + self.export_offset[1]:(self.export_offset[1] + + self.shape[1]) + ] y_start_key = 'columns' # Export the spreadsheet to the dictionary (that can by JSON-ified) diff --git a/setup.py b/setup.py index 65b5cbd..9d56a7a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="portable-spreadsheet", - version="2.1.7", + version="2.1.8", author="David Salac", author_email="info@davidsalac.eu", description="A simple spreadsheet that keeps tracks of each operation of each cell in defined languages. Logic allows exporting sheets to Excel files (and see how each cell is computed), to the JSON strings with a description of computation of each cell (e. g. in the native language). Other formats, like HTML, CSV and Markdown (MD), are also implemented (user can define own format). It also allows reconstructing behaviours in native Python with NumPy.", # noqa