spine_io.importers.excel_reader

Contains ExcelConnector class and a help function.

author:
  1. Vennström (VTT)
date:

1.6.2019

Module Contents

spine_io.importers.excel_reader.select_excel_file(parent=None)[source]

Launches QFileDialog with .xlsx and friends filter

class spine_io.importers.excel_reader.ExcelConnector[source]

Bases: spine_io.io_api.SourceConnection

Template class to read data from another QThread

DISPLAY_NAME = Excel[source]
OPTIONS[source]
SELECT_SOURCE_UI[source]
connect_to_source(self, source)[source]

saves filepath

Parameters:{str} -- filepath (source) –
disconnect(self)[source]

Disconnect from connected source.

get_tables(self)[source]

Method that should return a list of table names, list(str)

Raises:NotImplementedError – [description]
get_data_iterator(self, table, options, max_rows=-1)[source]

Return data read from data source table in table. If max_rows is specified only that number of rows.

spine_io.importers.excel_reader.create_mapping_from_sheet(worksheet)[source]

Checks if sheet is a valid spine excel template, if so creates a mapping object for each sheet.