예제 #1
0
 /// <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");
 }
예제 #2
0
		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);
		}
예제 #3
0
		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);
		}
예제 #4
0
 /// <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");
     }
 }