caosadvancedtools.table_json_conversion.export_import_xlsx module#

Utilities for automatically exporting and importing data to and from xlsx.

caosadvancedtools.table_json_conversion.export_import_xlsx.export_container_to_xlsx(records: Container, xlsx_data_filepath: str | Path, include_referenced_entities: bool = False, jsonschema_filepath: str | Path | None = None, jsondata_filepath: str | Path | None = None, xlsx_template_filepath: str | Path | None = None)#

Export the data of the given records to an xlsx file.

Parameters:
  • records (Container, Iterable) – List of records to export.

  • xlsx_data_filepath (str, Path) – Write the resulting xlsx file to the file at this location.

  • include_referenced_entities (bool) – If set to true, any records referenced by properties of those given in ‘records’ will also be exported. Optional, default False

  • jsonschema_filepath (str, Path) – If given, write the jsonschema to this file. Optional, default None

  • jsondata_filepath (str, Path) – If given, write the json data to this file. Optional, default None

  • xlsx_template_filepath (str, Path) – If given, write the xlsx template to this file. Optional, default None

  • Limitations

  • -----------

  • references (This function drops any versioning information from versioned)

  • reduced (references are)

  • references. (to unversioned)