Exemplo n.º 1
0
 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
Exemplo n.º 2
0
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'
Exemplo n.º 3
0
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'