Excel Export Specific options
Bases: ExportOptions
flowchart TD
metaframe.src.utils.opts_dataclass.export_excel.ExportOptionsExcel[ExportOptionsExcel]
metaframe.src.utils.opts_dataclass.export.ExportOptions[ExportOptions]
metaframe.src.utils.opts_dataclass.export.ExportOptions --> metaframe.src.utils.opts_dataclass.export_excel.ExportOptionsExcel
click metaframe.src.utils.opts_dataclass.export_excel.ExportOptionsExcel href "" "metaframe.src.utils.opts_dataclass.export_excel.ExportOptionsExcel"
click metaframe.src.utils.opts_dataclass.export.ExportOptions href "" "metaframe.src.utils.opts_dataclass.export.ExportOptions"
Excel-specific export options.
Extends ExportOptions with parameters controlling how the
DataFrame is written to Excel files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
merge_cells
|
bool
|
Whether MultiIndex headers should be merged into spanning cells. The resulting Excel file could be impossible to restore by reading, and autofilters could be disfonctional as merged cells insert NAs in some Excel versions. Safe in Google Sheets. |
False
|
merge_cells_summary
|
bool
|
Whether to merge cells in summary sheets. |
False
|
sheet_name
|
str | None
|
Name of the main worksheet. Can be set to None to deactivate the writing of the main sheet. |
"DataFrame"
|
sheet_name_mfr
|
str
|
Name of the worksheet containing the MetaFrameRow.
Used only if |
"MFR"
|
sheet_name_mfc
|
str
|
Name of the worksheet containing the MetaFrameCol.
Used only if |
"MFC"
|
sheet_name_summary_
|
Name of the optional summary worksheets. Can be set to None to deactivate the writing of an individual summary sheet. |
required | |
freeze_panes
|
bool
|
Whether to freeze header rows/columns for easier navigation. |
False
|
write_dtypes
|
bool
|
Whether to write the DataFrame dtypes (faster reading). |
True
|
write_summaries
|
bool
|
Whether to write summary informations |
False
|
grp_row
|
str | List[str] | List[List[str]] | None
|
Groups to apply to all grp_row*by. |
None
|
grp_col
|
str | List[str] | List[List[str]] | None
|
Groups to apply to all grp_col*by. |
None
|
grp_
|
Groups definition for summaries ( |
required | |
summary_row_id
|
str | List[str] | None
|
MetaFrameRow column(s) to keep in summaries. Can be set to None to keep all columns. |
None
|
summary_col_id
|
str | List[str] | None
|
MetaFrameCol column(s) to keep in summaries. Can be set to None to keep all columns. |
None
|
_
|
Internel parameters for custom aesthetics. |
required | |
kwargs_summary
|
Dict
|
Kwargs passed to |
dict()
|
Source code in metaframe/src/utils/opts_dataclass/export_excel.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |