Beispiel #1
0
    def open(self, file_name, **keywords):
        """open a file for writing ods"""
        BookWriter.open(self, file_name, **keywords)
        self.native_book = ezodf.newdoc(doctype="ods", filename=self.file_alike_object)

        skip_backup_flag = self.keywords.get('skip_backup', True)
        if skip_backup_flag:
            self.native_book.backup = False
Beispiel #2
0
    def open(self, file_name, **keywords):
        """
        Open a file for writing

        Please note that this writer configure xlsxwriter's BookWriter to use
        constant_memory by default.

        :param keywords: **default_date_format** control the date time format.
                         **constant_memory** if true, reduces the memory
                         footprint when writing large files. Other parameters
                         can be found in `xlsxwriter's documentation
                         <http://xlsxwriter.readthedocs.io/workbook.html>`_
        """
        keywords.setdefault('default_date_format', 'dd/mm/yy')
        keywords.setdefault('constant_memory', True)
        BookWriter.open(self, file_name, **keywords)

        self._native_book = xlsxwriter.Workbook(file_name, keywords)
 def write(self, incoming_dict):
     if incoming_dict:
         BookWriter.write(self, incoming_dict)
     else:
         raise NotImplementedError(EMPTY_SHEET_NOT_ALLOWED)
Beispiel #4
0
 def __init__(self):
     BookWriter.__init__(self)
     self.work_book = None
Beispiel #5
0
 def __init__(self):
     BookWriter.__init__(self)
     self.work_book = None
Beispiel #6
0
 def __init__(self):
     BookWriter.__init__(self)
     self._file_type = FILE_FORMAT_CSVZ
     self.zipfile = None
Beispiel #7
0
 def __init__(self):
     BookWriter.__init__(self)
     self._file_type = constants.FILE_FORMAT_CSV
     self.__index = 0
Beispiel #8
0
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
Beispiel #9
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.native_book = openpyxl.Workbook()
Beispiel #10
0
 def __init__(self):
     BookWriter.__init__(self)
     self.current_sheet = 0
     self.native_book = None
Beispiel #11
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.zipfile = zipfile.ZipFile(file_name, "w", zipfile.ZIP_DEFLATED)
def test_book_writer():
    book = BookWriter()
    book.create_sheet("test")
 def __init__(self):
     BookWriter.__init__(self)
     self._native_book = OpenDocumentSpreadsheet()
Beispiel #14
0
def test_book_writer():
    writer = BookWriter()
    writer.open_stream("a string")
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
     self.__auto_commit = True
Beispiel #16
0
 def __init__(self):
     BookWriter.__init__(self)
     self._native_book = OpenDocumentSpreadsheet()
 def __init__(self):
     BookWriter.__init__(self)
     self.current_sheet = 0
     self._native_book = None
Beispiel #18
0
 def __init__(self):
     BookWriter.__init__(self)
     self._file_type = constants.FILE_FORMAT_CSV
     self.__index = 0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self._native_book = openpyxl.Workbook(write_only=True)
Beispiel #20
0
 def __init__(self):
     BookWriter.__init__(self)
     self._native_book = None
Beispiel #21
0
def test_book_writer():
    writer = BookWriter()
    writer.open_stream("a string")
Beispiel #22
0
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
Beispiel #23
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.zipfile = zipfile.ZipFile(file_name, "w", zipfile.ZIP_DEFLATED)
Beispiel #24
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.zipfile = zipfile.ZipFile(file_name, 'w')
Beispiel #25
0
 def __init__(self):
     BookWriter.__init__(self)
     self.native_book = None
Beispiel #26
0
 def open(self, file_name,
          encoding='ascii', style_compression=2, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.work_book = Workbook(style_compression=style_compression,
                               encoding=encoding)
Beispiel #27
0
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
     self.__auto_commit = True
Beispiel #28
0
def test_book_writer():
    book = BookWriter()
    book.create_sheet("test")
 def open(self, file_name,
          encoding='ascii', style_compression=2, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.work_book = Workbook(style_compression=style_compression,
                               encoding=encoding)