public ReportVerificationModel() { SourceDataSet = new ReportDataSet(); DestinationDataSet = new ReportDataSet(); VerifiedResultSet = new ReportDataSet(); VerifiedResultMsg = new Dictionary<string, string>(); }
public ReportDataSet ReadDataSet(string file, int headerRowNumber) { ReportDataSet dataSet = new ReportDataSet(); try { excel = new Excel.Application(); Excel.Workbook tempBook = excel.Workbooks.Open(file); foreach (var item in tempBook.Sheets) { Excel.Worksheet sheet = item as Excel.Worksheet; ReportDataTable table = this.GetDataTable(sheet, headerRowNumber); dataSet.Tables.Add(table.Name, table); } tempBook.Save(); tempBook.Close(); tempBook = null; excel.Application.Quit(); } catch (Exception ex) { excel.Application.Quit(); } return(dataSet); }
public ReportDataSet ReadDataSet(string file, int headerRowNumber) { ReportDataSet dataSet = new ReportDataSet(); try { excel = new Excel.Application(); Excel.Workbook tempBook = excel.Workbooks.Open(file); foreach (var item in tempBook.Sheets) { Excel.Worksheet sheet = item as Excel.Worksheet; ReportDataTable table = this.GetDataTable(sheet, headerRowNumber); dataSet.Tables.Add(table.Name, table); } tempBook.Save(); tempBook.Close(); tempBook = null; excel.Application.Quit(); } catch (Exception ex) { excel.Application.Quit(); } return dataSet; }
public ReportVerificationModel() { SourceDataSet = new ReportDataSet(); DestinationDataSet = new ReportDataSet(); VerifiedResultSet = new ReportDataSet(); VerifiedResultMsg = new Dictionary <string, string>(); }