def __init__(self, parent_workbook, title, worksheet_path, xml_source, string_table, style_table): Worksheet.__init__(self, parent_workbook, title) self.worksheet_path = worksheet_path ReadOnlyCell.set_string_table(string_table) ReadOnlyCell.set_style_table(style_table) ReadOnlyCell.set_base_date(parent_workbook.excel_base_date) dimensions = read_dimension(self.xml_source) if dimensions is not None: self.min_col, self.min_row, self.max_col, self.max_row = dimensions
def test_string_table(): ReadOnlyCell.set_string_table({1:'Hello world'}) cell = ReadOnlyCell(None, None, 1, 's') assert cell.string_table == {1:'Hello world'} assert cell.value == 'Hello world'
def test_string_table(): ReadOnlyCell.set_string_table({1: 'Hello world'}) cell = ReadOnlyCell(None, None, 1, 's') assert cell.string_table == {1: 'Hello world'} assert cell.value == 'Hello world'