C# Class Microsoft.Legal.MatterCenter.Common.ExcelOperations

A class provides Excel related operations to read Excel sheets
Show file Open project: Microsoft/mattercenter

Public Methods

Method Description
IsNullOrEmptyCredential ( string userName, string password ) : bool

Function to validate user credentials

ReadFromExcel ( string filePath, string sheetName ) : string>.Dictionary

This function reads Excel file and returns dictionary

ReadSheet ( string filePath, string sheetName ) : Collection>

Function is used to return all the values that are read from Sheet

Private Methods

Method Description
ReadRow ( Row row, DocumentFormat.OpenXml.Packaging.WorkbookPart workbookPart ) : Collection

Function is used to read row values for the provided excel sheet

Method Details

IsNullOrEmptyCredential() public static method

Function to validate user credentials
public static IsNullOrEmptyCredential ( string userName, string password ) : bool
userName string User name to validate
password string Password to validate
return bool

ReadFromExcel() public static method

This function reads Excel file and returns dictionary
public static ReadFromExcel ( string filePath, string sheetName ) : string>.Dictionary
filePath string Full path to Excel file
sheetName string Sheet name containing configurations
return string>.Dictionary

ReadSheet() public static method

Function is used to return all the values that are read from Sheet
public static ReadSheet ( string filePath, string sheetName ) : Collection>
filePath string File path of the Excel
sheetName string Sheet to be read from Excel
return Collection>