private void ProcessRecordsExcel(object x)
        {
            ConcurrentExcelReader reader = x as ConcurrentExcelReader;
            SimpleSqlTableLoader  writer = new SimpleSqlTableLoader(m_Context);

            string[] line;
            int      rowsProcessed = 0;
            int      numColumns    = m_Context.ColumnNames.Count();

            while (reader.TryExtractRecord(out line))
            {
                var newRow = writer.GetEmptyRow();
                for (int i = 0; i < numColumns; i++)
                {
                    newRow[i] = line[i];
                }
                writer.PostRecord(newRow);
                if (++rowsProcessed % numberOfLines == 0)
                {
                    OnRecordsProcessed(Thread.CurrentThread.Name);
                }
            }
            //flush final records and trigger last event
            writer.WriteRecords();
            OnRecordsProcessed(Thread.CurrentThread.Name, rowsProcessed % numberOfLines);
        }
        public void TryExtractRecordTest()
        {
            ConcurrentExcelReader reader = new ConcurrentExcelReader(context);

            string[]        line;
            List <string[]> results = new List <string[]>();

            while (reader.TryExtractRecord(out line))
            {
                results.Add(line);
            }
            string[] firstColumn = new string[2] {
                "Nisha", "Jasper"
            };
            Assert.AreEqual(firstColumn[0], results[0][0]);
            Assert.AreEqual(firstColumn[1], results[1][0]);
        }