/// <summary>Create a new instance of the class.</summary> /// <param name="provider">The <see cref="DataLink.DataStorage"/> used to performs the transformation.</param> public ExcelDataLinkOleDb(DataStorage provider) { mProvider = provider; if (mProvider != null) mExcelStorage = new ExcelStorageOleDb(provider.RecordType); else throw new ArgumentException("provider can´t be null", "provider"); }
public void OrdersRead1() { ExcelStorageOleDb provider = new ExcelStorageOleDb(typeof (OrdersExcelType), 1, 1); provider.FileName = @"..\data\Excel\Orders.xls"; object[] res = provider.ExtractRecords(); Assert.AreEqual(830, res.Length); }
public void OneColumn() { ExcelStorageOleDb provider = new ExcelStorageOleDb(typeof(OneColumnType), 1, 1); provider.FileName = @"..\data\Excel\OneColumn.xls"; object[] res = provider.ExtractRecords(); Assert.AreEqual(50, res.Length); }
/// <summary>Create a new instance of the class.</summary> /// <param name="provider">The <see cref="DataLink.DataStorage"/> used to performs the transformation.</param> public ExcelDataLinkOleDb(DataStorage provider) { mProvider = provider; if (mProvider != null) { mExcelStorage = new ExcelStorageOleDb(provider.RecordType); } else { throw new ArgumentException("provider can´t be null", "provider"); } }