C# Class Smrf.NodeXL.ExcelTemplate.WorkbookImporter

Imports an edge list from an open workbook into an IGraph object.
Call ImportWorkbook to import an edge list from an open workbook.
Inheritance: WorkbookImporterBase
Datei anzeigen Open project: 2014-sed-team3/term-project

Public Methods

Method Description
AssertValid ( ) : void
ImportWorkbook ( Microsoft application, String sourceWorkbookName, Int32 columnNumberToUseForVertex1OneBased, Int32 columnNumberToUseForVertex2OneBased, ICollection edgeColumnNumbersToImportOneBased, ICollection vertex1ColumnNumbersToImportOneBased, ICollection vertex2ColumnNumbersToImportOneBased, System.Boolean sourceColumnsHaveHeaders ) : IGraph
WorkbookImporter ( ) : System

Initializes a new instance of the WorkbookImporter class.

Protected Methods

Method Description
AddAttributeValuesToEdgeOrVertex ( String asWorkbookColumnNames, Object oSubrangeValues, Int32 iRowOneBased, Int32 iFirstNonEmptyColumnOneBased, ICollection oColumnNumbersToImportOneBased, IMetadataProvider oEdgeOrVertex ) : void
GetColumnNamesToImport ( Range oNonEmptySourceRange, String asWorkbookColumnNames, ICollection oColumnNumbersToImportOneBased ) : String[]
GetNonEmptySourceRange ( Worksheet oSourceWorksheet ) : Range
GetWorkbookColumnNames ( Worksheet oSourceWorksheet, Range oNonEmptySourceRange, System.Boolean bSourceColumnsHaveHeaders ) : String[]
ImportWorkbookIntoGraph ( Worksheet oSourceWorksheet, Range oNonEmptySourceRange, Int32 iColumnNumberToUseForVertex1OneBased, Int32 iColumnNumberToUseForVertex2OneBased, ICollection oEdgeColumnNumbersToImportOneBased, ICollection oVertex1ColumnNumbersToImportOneBased, ICollection oVertex2ColumnNumbersToImportOneBased, System.Boolean bSourceColumnsHaveHeaders ) : IGraph

Method Details

AddAttributeValuesToEdgeOrVertex() protected method

protected AddAttributeValuesToEdgeOrVertex ( String asWorkbookColumnNames, Object oSubrangeValues, Int32 iRowOneBased, Int32 iFirstNonEmptyColumnOneBased, ICollection oColumnNumbersToImportOneBased, IMetadataProvider oEdgeOrVertex ) : void
asWorkbookColumnNames String
oSubrangeValues Object
iRowOneBased System.Int32
iFirstNonEmptyColumnOneBased System.Int32
oColumnNumbersToImportOneBased ICollection
oEdgeOrVertex IMetadataProvider
return void

AssertValid() public method

public AssertValid ( ) : void
return void

GetColumnNamesToImport() protected method

protected GetColumnNamesToImport ( Range oNonEmptySourceRange, String asWorkbookColumnNames, ICollection oColumnNumbersToImportOneBased ) : String[]
oNonEmptySourceRange Range
asWorkbookColumnNames String
oColumnNumbersToImportOneBased ICollection
return String[]

GetNonEmptySourceRange() protected method

protected GetNonEmptySourceRange ( Worksheet oSourceWorksheet ) : Range
oSourceWorksheet Worksheet
return Range

GetWorkbookColumnNames() protected method

protected GetWorkbookColumnNames ( Worksheet oSourceWorksheet, Range oNonEmptySourceRange, System.Boolean bSourceColumnsHaveHeaders ) : String[]
oSourceWorksheet Worksheet
oNonEmptySourceRange Range
bSourceColumnsHaveHeaders System.Boolean
return String[]

ImportWorkbook() public method

public ImportWorkbook ( Microsoft application, String sourceWorkbookName, Int32 columnNumberToUseForVertex1OneBased, Int32 columnNumberToUseForVertex2OneBased, ICollection edgeColumnNumbersToImportOneBased, ICollection vertex1ColumnNumbersToImportOneBased, ICollection vertex2ColumnNumbersToImportOneBased, System.Boolean sourceColumnsHaveHeaders ) : IGraph
application Microsoft
sourceWorkbookName String
columnNumberToUseForVertex1OneBased System.Int32
columnNumberToUseForVertex2OneBased System.Int32
edgeColumnNumbersToImportOneBased ICollection
vertex1ColumnNumbersToImportOneBased ICollection
vertex2ColumnNumbersToImportOneBased ICollection
sourceColumnsHaveHeaders System.Boolean
return IGraph

ImportWorkbookIntoGraph() protected method

protected ImportWorkbookIntoGraph ( Worksheet oSourceWorksheet, Range oNonEmptySourceRange, Int32 iColumnNumberToUseForVertex1OneBased, Int32 iColumnNumberToUseForVertex2OneBased, ICollection oEdgeColumnNumbersToImportOneBased, ICollection oVertex1ColumnNumbersToImportOneBased, ICollection oVertex2ColumnNumbersToImportOneBased, System.Boolean bSourceColumnsHaveHeaders ) : IGraph
oSourceWorksheet Worksheet
oNonEmptySourceRange Range
iColumnNumberToUseForVertex1OneBased System.Int32
iColumnNumberToUseForVertex2OneBased System.Int32
oEdgeColumnNumbersToImportOneBased ICollection
oVertex1ColumnNumbersToImportOneBased ICollection
oVertex2ColumnNumbersToImportOneBased ICollection
bSourceColumnsHaveHeaders System.Boolean
return IGraph

WorkbookImporter() public method

Initializes a new instance of the WorkbookImporter class.
public WorkbookImporter ( ) : System
return System