public void TestConstructorWorks() { MicrosoftExcel exInstance = new MicrosoftExcel(); MicrosoftExcel otherExcelInstance = new MicrosoftExcel(false); MicrosoftExcel visibleExcelInstance = new MicrosoftExcel(true); }
public void TestGetRange() { MicrosoftExcel exInstance = new MicrosoftExcel(); Range myDate = exInstance.GetRangeFromActiveWorksheet("A5"); var rangeValue = myDate.Value; Assert.AreEqual(10108, rangeValue); exInstance.CloseInstance(); Marshal.FinalReleaseComObject(myDate); }
public void TestOpenWorkbook() { MicrosoftExcel exInstance = new MicrosoftExcel(false); exInstance.OpenWorkbook(@"S:\Market\ERCOT\FELPS\FELPS 2012 RFP\From Moffitt\MV90 Data_Floresville_2008.xlsx"); // Test opening multiple sheets at once exInstance.OpenWorkbook(@"S:\Market\ERCOT\FELPS\FELPS 2012 RFP\From Moffitt\MV90 Data_Floresville_2009.xlsx"); exInstance.OpenWorkbook(@"S:\Market\ERCOT\FELPS\FELPS 2012 RFP\From Moffitt\MV90 Data_Floresville_2010.xlsx"); exInstance.CloseInstance(); }