class_docstr: Class for formatting a DataFrame to a list of ExcelCells,
  
  Parameters
  ----------
  df : DataFrame or Styler
  na_rep: na representation
  float_format : string, default None
          Format string for floating point numbers
  cols : sequence, optional
      Columns to write
  header : boolean or list of string, default True
      Write out column names. If a list of string is given it is
      assumed to be aliases for the column names
  index : boolean, default True
      output row names (index)
  index_label : string or sequence, default None
          Column label for index column(s) if desired. If None is given, and
          `header` and `index` are True, then the index names are used. A
          sequence should be given if the DataFrame uses MultiIndex.
  merge_cells : boolean, default False
          Format MultiIndex and Hierarchical Rows as merged cells.
  inf_rep : string, default `'inf'`
      representation for np.inf values (which aren't representable in Excel)
      A `'-'` sign will be added in front of -inf.
  style_converter : callable, optional
      This translates Styler styles (CSS) into ExcelWriter styles.
      Defaults to ``CSSToExcelConverter()``.
      It should have signature css_declarations string -> excel style.
      This is only called for body cells.
code: def __init__(
      self,
      df,
      na_rep="",
      float_format=None,
      cols=None,
      header=True,
      index=True,
      index_label=None,
      merge_cells=False,
      inf_rep="inf",
      style_converter=None,
  ):
      self.rowcounter = 0
      self.na_rep = na_rep
      if hasattr(df, "render"):
          self.styler = df
          df = df.data
          if style_converter is None:
              style_converter = CSSToExcelConverter()
          self.style_converter = style_converter
      else:
          self.styler = None
      self.df = df
      if cols is not None:
          # all missing, raise
          if not len(Index(cols) & df.columns):
              raise KeyError(
                  "passes columns are not ALL present dataframe"
              )
  
          # deprecatedin gh-17295
          # 1 missing is ok (for now)
          if len(Index(cols) & df.columns) != len(cols):
              warnings.warn(
                  "Not all names specified in 'columns' are found; "
                  "this will raise a KeyError in the future",
                  FutureWarning,
              )
  
          self.df = df.reindex(columns=cols)
      self.columns = self.df.columns
      self.float_format = float_format
      self.index = index
      self.index_label = index_label
      self.header = header
      self.merge_cells = merge_cells
      self.inf_rep = inf_rep
  
imports: import itertools
  import re
  import warnings
  import numpy
  from pandas.compat import reduce
  from pandas.core.dtypes import missing
  from pandas.core.dtypes.common import is_float, is_scalar
  from pandas.core.dtypes.generic import ABCMultiIndex, ABCPeriodIndex
  from pandas import Index
  import pandas.core.common
  from pandas.io.formats.css import CSSResolver, CSSWarning
  from pandas.io.formats.format import get_level_lengths
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 1 to create a new ExcelFormatter object from inherited base classes: object with example: obj = ExcelFormatter(df, na_rep, float_format, cols, header, index, index_label, merge_cells, inf_rep, style_converter)