FileStream stream = File.Open(SourceUpload.Fullpath, FileMode.Open, FileAccess.Read); IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream); ds = excelReader.AsDataSet();