I am facing an major issue when comparing to excel files.
When the excel files are basic...few columns and rows...every comparison works.
When the files are huge like 2500 columns and rows i got the following error.
Code: Select all
/// <summary>
/// method to compare two excel files
/// </summary>
/// <param name="refFile"></param>
/// <param name="cmpFile"></param>
public static void CompareExcelFiles(string refFile, string cmpFile)
{
//validate path to configuration file
ExcelFileExists(refFile);
//create CSV data connector
string refConnector = "ExcelConnector";
ExcelFileExists(cmpFile);
//create CSV data connector
string cmpConnector = "ExcelConnector";
//get data from ref. Excel
Ranorex.Core.Data.ExcelDataConnector refExcelConnector = new Ranorex.Core.Data.ExcelDataConnector(refConnector,@refFile,"Book Value","",System.Windows.Forms.CheckState.Unchecked);
Ranorex.Core.Data.ColumnCollection refExcelColumns = new Ranorex.Core.Data.ColumnCollection();
Ranorex.Core.Data.RowCollection refExcelRows = new Ranorex.Core.Data.RowCollection(refExcelColumns);
//load Excel connector
refExcelConnector.LoadData(out refExcelColumns, out refExcelRows);
//get data from cmp. Excel
Ranorex.Core.Data.ExcelDataConnector cmpExcelConnector = new Ranorex.Core.Data.ExcelDataConnector(cmpConnector,@cmpFile,"Book Value","",System.Windows.Forms.CheckState.Unchecked);
Ranorex.Core.Data.ColumnCollection cmpExcelColumns = new Ranorex.Core.Data.ColumnCollection();
Ranorex.Core.Data.RowCollection cmpExcelRows = new Ranorex.Core.Data.RowCollection(cmpExcelColumns);
//load Excel connector
cmpExcelConnector.LoadData(out cmpExcelColumns, out cmpExcelRows);
Thanks for the help