Example #1
0
def DummyCell(dummy_sheet):

    dummy_sheet.parent._number_formats.add('d-mmm-yy')
    style = StyleArray([0, 0, 0, 164, 0, 0, 0, 0, 0])
    dummy_sheet.parent._cell_styles.add(style)
    cell = ReadOnlyCell(dummy_sheet, None, None, "23596", 'n', 1)
    return cell
Example #2
0
 def __init__(self):
     self._differential_styles = []
     self.shared_strings = IndexedList()
     self.shared_strings.add("hello world")
     self._fonts = IndexedList()
     self._fills = IndexedList()
     self._number_formats = IndexedList()
     self._borders = IndexedList()
     self._alignments = IndexedList()
     self._protections = IndexedList()
     self._cell_styles = IndexedList()
     self.vba_archive = None
     for i in range(29):
         self._cell_styles.add((StyleArray([i]*9)))
     self._cell_styles.add(StyleArray([0,4,6,0,0,1,0,0,0])) #fillId=4, borderId=6, alignmentId=1))
     self.sheetnames = []
Example #3
0
 def __init__(self):
     self.shared_strings = IndexedList()
     self._cell_styles = IndexedList(
         [StyleArray([0, 0, 0, 0, 0, 0, 0, 0, 0])])
     self._number_formats = IndexedList()
     self.encoding = "UTF-8"
     self.epoch = CALENDAR_WINDOWS_1900
     self.sheetnames = []
Example #4
0
 class DummyWorkbook(object):
     shared_styles = IndexedList()
     style = StyleArray()
     shared_styles.add(style)  # Workbooks always have a default style
     _cell_styles = IndexedList()
     _cell_styles.add(style)
     _number_formats = IndexedList()
     _fonts = IndexedList()
     _fonts.add(None)
Example #5
0
 def __init__(self):
     self._differential_styles = []
     self.shared_strings = IndexedList()
     self._fonts = IndexedList()
     self._fills = IndexedList()
     self._number_formats = IndexedList()
     self._borders = IndexedList()
     self._alignments = IndexedList()
     self._protections = IndexedList()
     self._cell_styles = IndexedList()
     self.vba_archive = None
     self._cell_styles.add(StyleArray([0, 0, 0, 14, 0, 0, 0, 0, 0]))
     self.sheetnames = []
Example #6
0
 def __init__(self):
     self.shared_styles = IndexedList()
     self._cell_styles = IndexedList()
     self._cell_styles.add(StyleArray())
     self._cell_styles.add(StyleArray([10, 0, 0, 0, 0, 0, 0, 0, 0, 0]))
     self.sheetnames = []
Example #7
0
    class Workbook:
        epoch = None
        _cell_styles = [StyleArray([0, 0, 0, 0, 0, 0, 0, 0, 0])]

        def __init__(self):
            self.sheetnames = []
Example #8
0
 def test_style_array(self, dummy_sheet):
     cell = ReadOnlyCell(dummy_sheet, None, None, None)
     assert cell.style_array == StyleArray()