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 DummyCell():
    class DummyNumberFormat:

        format_code = 'd-mmm-yy'

    class DummyStyle(object):

        number_format = DummyNumberFormat()

    style_table = {1: DummyStyle()}
    cell = ReadOnlyCell(None, None, "23596", 'n', '1')
    cell.set_style_table(style_table)
    return cell
Exemplo n.º 3
0
def DummyCell():
    class DummyNumberFormat:

        format_code = 'd-mmm-yy'


    class DummyStyle(object):

        number_format = DummyNumberFormat()

    style_table = {1:DummyStyle()}
    cell = ReadOnlyCell(None, None, "23596", 'n', '1')
    cell.set_style_table(style_table)
    return cell
Exemplo n.º 4
0
def test_style_table():
    ReadOnlyCell.set_style_table({})
    cell = ReadOnlyCell(None, None, 10, 'n')
    assert cell.style_table == {}
Exemplo n.º 5
0
def test_style_table():
    ReadOnlyCell.set_style_table({})
    cell = ReadOnlyCell(None, None, 10, 'n')
    assert cell.style_table == {}