def assemble_xml_file # :nodoc:
      return unless @writer

      write_xml_declaration do
        # Write the root chartsheet element.
        write_chartsheet do
          # Write the worksheet properties.
          write_sheet_pr
          # Write the sheet view properties.
          write_sheet_views
          # Write the sheetProtection element.
          write_sheet_protection
          # Write the printOptions element.
          write_print_options
          # Write the worksheet page_margins.
          write_page_margins
          # Write the worksheet page setup.
          write_page_setup
          # Write the headerFooter element.
          write_header_footer
          # Write the drawing element.
          write_drawings
          # Close the worksheet tag.
        end
      end
    end
def assemble_xml_file # :nodoc:
      return unless @writer

      write_xml_declaration do
        # Write the root chartsheet element.
        write_chartsheet do
          # Write the worksheet properties.
          write_sheet_pr
          # Write the sheet view properties.
          write_sheet_views
          # Write the sheetProtection element.
          write_sheet_protection
          # Write the printOptions element.
          write_print_options
          # Write the worksheet page_margins.
          write_page_margins
          # Write the worksheet page setup.
          write_page_setup
          # Write the headerFooter element.
          write_header_footer
          # Write the drawing element.
          write_drawings
          # Close the worksheet tag.
        end
      end
    end
Assemble and write the XML file.