public void LoadExcelFile() { var ofd = new OpenFileDialog(); ofd.Filter = "Excel files (*.xlsx) | *.xlsx;"; ofd.Multiselect = false; var result = ofd.ShowDialog(); if (result == true) { ExcelFileName = ofd.FileName; CurrentStatus = "Loading file: " + ExcelFileName; MyExcelHelper.Load(ExcelFileName); Rules = MyExcelHelper.Rules; CurrentStatus = "File Loaded"; } }