ReadWorkbook
(
Microsoft.Office.Interop.Excel.Workbook oWorkbook,
IGraphMetricCalculator2 [] oGraphMetricCalculators
)
{
Debug.Assert(oWorkbook != null);
Debug.Assert(oGraphMetricCalculators != null);
AssertValid();
ReadWorkbookContext oReadWorkbookContext = new ReadWorkbookContext();
oReadWorkbookContext.FillIDColumns = true;
oReadWorkbookContext.PopulateVertexWorksheet = true;
oReadWorkbookContext.ReadGroups = true;
// Some of the graph metric calculators, such as
// TopItemsCalculatorBase2, need to rank vertices or edges by values in
// a specified column. Make those values available on the graph.
oReadWorkbookContext.ReadAllEdgeAndVertexColumns = true;
WorkbookReader oWorkbookReader = new WorkbookReader();
return ( oWorkbookReader.ReadWorkbook(
oWorkbook, oReadWorkbookContext) );
}