コード例 #1
0
ファイル: packager.py プロジェクト: zhangfp/hr_release
    def _write_table_files(self):
        # Write the table files.
        index = 1
        for worksheet in self.workbook.worksheets():
            table_props = worksheet.tables

            if not table_props:
                continue

            for table_props in table_props:
                table = Table()
                table._set_xml_writer(self._filename('xl/tables/table'
                                                     + str(index) + '.xml'))
                table._set_properties(table_props)
                table._assemble_xml_file()
                self.table_count += 1
                index += 1
コード例 #2
0
ファイル: packager.py プロジェクト: hekevintran/XlsxWriter
    def _write_table_files(self):
        # Write the table files.
        index = 1
        for worksheet in self.workbook.worksheets():
            table_props = worksheet.tables

            if not table_props:
                continue

            for table_props in table_props:
                table = Table()
                table._set_xml_writer(self._filename("xl/tables/table" + str(index) + ".xml"))
                table._set_properties(table_props)
                table._assemble_xml_file()
                self.table_count += 1
                index += 1
コード例 #3
0
    def _write_table_files(self):
        # Write the table files.
        xlsx_dir = self.package_dir

        index = 1
        for worksheet in self.workbook.worksheets():
            table_props = worksheet.tables

            if not table_props:
                continue

            self._mkdir(xlsx_dir + '/xl')
            self._mkdir(xlsx_dir + '/xl/tables')

            for table_props in table_props:
                table = Table()
                table._set_xml_writer(xlsx_dir + '/xl/tables/table' +
                                      str(index) + '.xml')
                table._set_properties(table_props)
                table._assemble_xml_file()
                self.table_count += 1
                index += 1
コード例 #4
0
    def _write_table_files(self):
        # Write the table files.
        xlsx_dir = self.package_dir

        index = 1
        for worksheet in self.workbook.worksheets():
            table_props = worksheet.tables

            if not table_props:
                continue

            self._mkdir(xlsx_dir + '/xl')
            self._mkdir(xlsx_dir + '/xl/tables')

            for table_props in table_props:
                table = Table()
                table._set_xml_writer(xlsx_dir + '/xl/tables/table'
                                      + str(index) + '.xml')
                table._set_properties(table_props)
                table._assemble_xml_file()
                self.table_count += 1
                index += 1