Esempio n. 1
0
    def _write_vml_files(self):
        # Write the comment VML files.
        index = 1
        for worksheet in self.workbook.worksheets():
            if not worksheet.has_vml and not worksheet.has_header_vml:
                continue
            if worksheet.has_vml:
                vml = Vml()
                vml._set_xml_writer(self._filename('xl/drawings/vmlDrawing'
                                                   + str(index) + '.vml'))
                vml._assemble_xml_file(worksheet.vml_data_id,
                                       worksheet.vml_shape_id,
                                       worksheet.comments_list,
                                       worksheet.buttons_list)
                index += 1

            if worksheet.has_header_vml:
                vml = Vml()

                vml._set_xml_writer(self._filename('xl/drawings/vmlDrawing'
                                                   + str(index) + '.vml'))
                vml._assemble_xml_file(worksheet.vml_header_id,
                                       worksheet.vml_header_id * 1024,
                                       None,
                                       None,
                                       worksheet.header_images_list)

                self._write_vml_drawing_rels_file(worksheet, index)
                index += 1
Esempio n. 2
0
    def _write_vml_files(self):
        # Write the comment VML files.
        index = 1
        for worksheet in self.workbook.worksheets():
            if not worksheet.has_vml:
                continue

            vml = Vml()
            vml._set_xml_writer(self._filename("xl/drawings/vmlDrawing" + str(index) + ".vml"))
            vml._assemble_xml_file(
                worksheet.vml_data_id, worksheet.vml_shape_id, worksheet.comments_array, worksheet.buttons_array
            )
            index += 1
Esempio n. 3
0
    def _write_vml_files(self):
        # Write the comment VML files.
        xlsx_dir = self.package_dir

        index = 1
        for worksheet in self.workbook.worksheets():
            if not worksheet.has_vml:
                continue

            vml = Vml()

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

            vml._set_xml_writer(xlsx_dir
                                + '/xl/drawings/vmlDrawing'
                                + str(index) + '.vml')
            vml._assemble_xml_file(worksheet.vml_data_id,
                                   worksheet.vml_shape_id,
                                   worksheet.comments_array,
                                   worksheet.buttons_array)
            index += 1
Esempio n. 4
0
    def _write_vml_files(self):
        # Write the comment VML files.
        index = 1
        for worksheet in self.workbook.worksheets():
            if not worksheet.has_vml:
                continue

            vml = Vml()
            vml._set_xml_writer(
                self._filename('xl/drawings/vmlDrawing' + str(index) + '.vml'))
            vml._assemble_xml_file(worksheet.vml_data_id,
                                   worksheet.vml_shape_id,
                                   worksheet.comments_array,
                                   worksheet.buttons_array)
            index += 1
Esempio n. 5
0
    def _write_vml_files(self):
        # Write the comment VML files.
        xlsx_dir = self.package_dir

        index = 1
        for worksheet in self.workbook.worksheets():
            if not worksheet.has_vml:
                continue

            vml = Vml()

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

            vml._set_xml_writer(xlsx_dir + '/xl/drawings/vmlDrawing' +
                                str(index) + '.vml')
            vml._assemble_xml_file(worksheet.vml_data_id,
                                   worksheet.vml_shape_id,
                                   worksheet.comments_array,
                                   worksheet.buttons_array)
            index += 1
Esempio n. 6
0
    def _write_vml_files(self):
        # Write the comment VML files.
        index = 1
        for worksheet in self.workbook.worksheets():
            if not worksheet.has_vml and not worksheet.has_header_vml:
                continue
            if worksheet.has_vml:
                vml = Vml()
                vml._set_xml_writer(self._filename('xl/drawings/vmlDrawing'
                                                   + str(index) + '.vml'))
                vml._assemble_xml_file(worksheet.vml_data_id,
                                       worksheet.vml_shape_id,
                                       worksheet.comments_list,
                                       worksheet.buttons_list)
                index += 1

            if worksheet.has_header_vml:
                vml = Vml()

                vml._set_xml_writer(self._filename('xl/drawings/vmlDrawing'
                                                   + str(index) + '.vml'))
                vml._assemble_xml_file(worksheet.vml_header_id,
                                       worksheet.vml_header_id * 1024,
                                       None,
                                       None,
                                       worksheet.header_images_list)

                self._write_vml_drawing_rels_file(worksheet, index)
                index += 1