示例#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
示例#2
0
文件: xlsxw.py 项目: St4nK/aurorai
    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)
示例#3
0
 def write(self, incoming_dict):
     if incoming_dict:
         BookWriter.write(self, incoming_dict)
     else:
         raise NotImplementedError(EMPTY_SHEET_NOT_ALLOWED)
示例#4
0
文件: xls.py 项目: jayvdb/pyexcel-xls
 def __init__(self):
     BookWriter.__init__(self)
     self.work_book = None
示例#5
0
 def __init__(self):
     BookWriter.__init__(self)
     self.work_book = None
示例#6
0
 def __init__(self):
     BookWriter.__init__(self)
     self._file_type = FILE_FORMAT_CSVZ
     self.zipfile = None
示例#7
0
 def __init__(self):
     BookWriter.__init__(self)
     self._file_type = constants.FILE_FORMAT_CSV
     self.__index = 0
示例#8
0
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
示例#9
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.native_book = openpyxl.Workbook()
示例#10
0
 def __init__(self):
     BookWriter.__init__(self)
     self.current_sheet = 0
     self.native_book = None
示例#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()
示例#14
0
def test_book_writer():
    writer = BookWriter()
    writer.open_stream("a string")
示例#15
0
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
     self.__auto_commit = True
示例#16
0
 def __init__(self):
     BookWriter.__init__(self)
     self._native_book = OpenDocumentSpreadsheet()
示例#17
0
 def __init__(self):
     BookWriter.__init__(self)
     self.current_sheet = 0
     self._native_book = None
示例#18
0
 def __init__(self):
     BookWriter.__init__(self)
     self._file_type = constants.FILE_FORMAT_CSV
     self.__index = 0
示例#19
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self._native_book = openpyxl.Workbook(write_only=True)
示例#20
0
文件: xlsxw.py 项目: St4nK/aurorai
 def __init__(self):
     BookWriter.__init__(self)
     self._native_book = None
示例#21
0
def test_book_writer():
    writer = BookWriter()
    writer.open_stream("a string")
示例#22
0
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
示例#23
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.zipfile = zipfile.ZipFile(file_name, "w", zipfile.ZIP_DEFLATED)
示例#24
0
 def open(self, file_name, **keywords):
     BookWriter.open(self, file_name, **keywords)
     self.zipfile = zipfile.ZipFile(file_name, 'w')
示例#25
0
 def __init__(self):
     BookWriter.__init__(self)
     self.native_book = None
示例#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)
示例#27
0
 def __init__(self):
     BookWriter.__init__(self)
     self.__importer = None
     self.__auto_commit = True
示例#28
0
def test_book_writer():
    book = BookWriter()
    book.create_sheet("test")
示例#29
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)