actio_python_utils.utils.extract_excel_sheet

actio_python_utils.utils.extract_excel_sheet(fn, output_fn, sheet='Sheet1', skip_nlines=0, comment_prefix=None, replacement_patterns={}, **kwargs)[source]

Extract a sheet from an Excel spreadsheet.

Parameters:
  • fn (str) – The spreadsheet filename

  • output_fn (str) – The output filename

  • sheet (str, default: 'Sheet1') – The sheet name to extract

  • skip_nlines (int, default: 0) – Skip this many lines

  • comment_prefix (Optional[str], default: None) – Skip each line that begins with this string

  • replacement_patterns (Optional[Mapping[str, str]], default: {}) – A mapping of patterns to replace; each key will be replaced by its value

  • **kwargs – Any keyword arguments to pass to csv.writer

Return type:

None