spinetoolbox.spine_io.importers.excel_reader¶
Contains ExcelConnector class and a help function.
| author: |
|
|---|---|
| date: | 1.6.2019 |
Module Contents¶
Classes¶
ExcelConnector |
Template class to read data from another QThread. |
Functions¶
select_excel_file(parent=None) |
Launches QFileDialog with .xlsx and friends filter |
get_mapped_data_from_xlsx(filepath) |
Returns mapped data from given Excel file assuming it has the default Spine Excel format. |
create_mapping_from_sheet(worksheet) |
Checks if sheet has the default Spine Excel format, if so creates a |
-
spinetoolbox.spine_io.importers.excel_reader.select_excel_file(parent=None)[source]¶ Launches QFileDialog with .xlsx and friends filter
-
class
spinetoolbox.spine_io.importers.excel_reader.ExcelConnector(settings)[source]¶ Bases:
spinetoolbox.spine_io.io_api.SourceConnectionTemplate class to read data from another QThread.
Parameters: settings (dict, optional) – connector specific settings or None -
get_tables(self)[source]¶ Method that should return Excel sheets as mappings and their options.
Returns: Sheets as mappings and options for each sheet or an empty dictionary if no workbook. Return type: dict Raises: Exception– If something goes wrong.
-