original_docstring: 
          Generator that creates the XML file and the sheet header
          
docstring: Generator that creates the XML file and the sheet header
docstring_tokens: Generator that creates the XML file and the sheet header
code: def _write_header(self):
          """
          Generator that creates the XML file and the sheet header
          """
  
          with xmlfile(self.filename) as xf:
              with xf.element("worksheet", xmlns=SHEET_MAIN_NS):
  
                  if self.sheet_properties:
                      pr = self.sheet_properties.to_tree()
  
                  xf.write(pr)
                  xf.write(self.views.to_tree())
  
                  cols = self.column_dimensions.to_tree()
  
                  self.sheet_format.outlineLevelCol = self.column_dimensions.max_outline
                  xf.write(self.sheet_format.to_tree())
  
                  if cols is not None:
                      xf.write(cols)
  
                  with xf.element("sheetData"):
                      try:
                          while True:
                              r = (yield)
                              xf.write(r)
                      except GeneratorExit:
                          pass
  
                  if self.protection.sheet:
                      xf.write(worksheet.protection.to_tree())
  
                  if self.auto_filter.ref:
                      xf.write(self.auto_filter.to_tree())
  
                  if self.sort_state.ref:
                      xf.write(self.sort_state.to_tree())
  
                  if self.data_validations.count:
                      xf.write(self.data_validations.to_tree())
  
                  drawing = write_drawing(self)
                  if drawing is not None:
                      xf.write(drawing)
  
                  if self._comments:
                      legacyDrawing = Related(id="anysvml")
                      xml = legacyDrawing.to_tree("legacyDrawing")
                      xf.write(xml)
code_tokens: def _write_header ( self ) : with xmlfile ( self . filename ) as xf : with xf . element ( "worksheet" , xmlns = SHEET_MAIN_NS ) : if self . sheet_properties : pr = self . sheet_properties . to_tree ( ) xf . write ( pr ) xf . write ( self . views . to_tree ( ) ) cols = self . column_dimensions . to_tree ( ) self . sheet_format . outlineLevelCol = self . column_dimensions . max_outline xf . write ( self . sheet_format . to_tree ( ) ) if cols is not None : xf . write ( cols ) with xf . element ( "sheetData" ) : try : while True : r = ( yield ) xf . write ( r ) except GeneratorExit : pass if self . protection . sheet : xf . write ( worksheet . protection . to_tree ( ) ) if self . auto_filter . ref : xf . write ( self . auto_filter . to_tree ( ) ) if self . sort_state . ref : xf . write ( self . sort_state . to_tree ( ) ) if self . data_validations . count : xf . write ( self . data_validations . to_tree ( ) ) drawing = write_drawing ( self ) if drawing is not None : xf . write ( drawing ) if self . _comments : legacyDrawing = Related ( id = "anysvml" ) xml = legacyDrawing . to_tree ( "legacyDrawing" ) xf . write ( xml )
short_docstring: Generator that creates the XML file and the sheet header
short_docstring_tokens: Generator that creates the XML file and the sheet header
comment: """
          Generator that creates the XML file and the sheet header
          """