Table of Contents

Interface IDataImportProvider

Namespace
Dynamicweb.DataIntegration.Integration.Interfaces
Assembly
Dynamicweb.DataIntegration.dll

Interface for reading tabular data from an uploaded source file. Counterpart to IDataExportProvider: implementations are discovered through the AddIn manager, so UI projects can offer file imports without referencing a specific file-format library.

public interface IDataImportProvider

Methods

CanRead(string)

Returns whether this provider can read the given file, typically decided by its extension.

bool CanRead(string sourceFilePath)

Parameters

sourceFilePath string

Absolute path to the source file

Returns

bool

GetColumns(string)

Gets the column names from the header row of the source file.

IEnumerable<string> GetColumns(string sourceFilePath)

Parameters

sourceFilePath string

Absolute path to the source file

Returns

IEnumerable<string>

Column names in file order; empty when the file has no header row

ReadRows(string)

Reads the data rows of the source file, one dictionary per row keyed by column name.

IEnumerable<IDictionary<string, object?>> ReadRows(string sourceFilePath)

Parameters

sourceFilePath string

Absolute path to the source file

Returns

IEnumerable<IDictionary<string, object>>

Rows in file order, excluding the header row

To top