code: def __init__(
      self,
      path: FilePath | WriteExcelBuffer | ExcelWriter,
      engine: str | None = None,
      date_format: str | None = None,
      datetime_format: str | None = None,
      mode: str = "w",
      storage_options: StorageOptions = None,
      if_sheet_exists: str | None = None,
      engine_kwargs: dict[str, Any] | None = None,
      **kwargs,
  ) -> None:
      # Use the xlsxwriter module as the Excel writer.
      from xlsxwriter import Workbook
  
      engine_kwargs = combine_kwargs(engine_kwargs, kwargs)
  
      if mode == "a":
          raise ValueError(
              "Append mode is not supported with xlsxwriter!"
          )
  
      super().__init__(
          path,
          engine=engine,
          date_format=date_format,
          datetime_format=datetime_format,
          mode=mode,
          storage_options=storage_options,
          if_sheet_exists=if_sheet_exists,
          engine_kwargs=engine_kwargs,
      )
  
      self._book = Workbook(self._handles.handle, **engine_kwargs)
  
file_path: catboost/contrib/python/pandas/py3/pandas/io/excel/_xlsxwriter.py
imports: from __future__ import annotations
  from typing import Any
  from pandas._libs import json
  from pandas._typing import FilePath, StorageOptions, WriteExcelBuffer
  from pandas.io.excel._base import ExcelWriter
  from pandas.io.excel._util import combine_kwargs, validate_freeze_panes
label_desc: Use image node_id 1 to create a new XlsxWriter object from inherited base classes: ExcelWriter with example: obj = XlsxWriter(path, engine, date_format, datetime_format, mode, storage_options, if_sheet_exists, engine_kwargs)