pypsa.Network.export_to_excel

pypsa.Network.export_to_excel#

Network.export_to_excel(excel_file_path: str | Path, export_standard_types: bool = False, engine: str = 'openpyxl') None#

Export network and components to an Excel file.

It is recommended to only use the Excel format if needed and for small networks. Excel files are not as efficient as other formats and can be slow to read/write.

Both static and series attributes of all components are exported, but only if they have non-default values.

If excel_file_path does not already exist, it is created.

Static attributes are exported in one sheet per component, e.g. a sheet named generators.

Series attributes are exported in one sheet per component per attribute, e.g. a sheet named generators-p_set.

Parameters:
  • excel_file_path (string or Path) – Path to the Excel file to which to export.

  • export_standard_types (boolean, default False) – If True, then standard types are exported too (upon reimporting you should then set “ignore_standard_types” when initialising the network).

  • engine (string, default "openpyxl") – The engine to use for writing the Excel file. See pandas.ExcelWriter

Examples

>>> n.export_to_excel(excel_file_path) 

See also

export_to_netcdf

Export to a netCDF file

export_to_hdf5

Export to an HDF5 file

export_to_csv_folder

Export to a folder of CSVs