Exemplo n.º 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");
 }
Exemplo n.º 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);
		}
Exemplo n.º 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);
		}
Exemplo n.º 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");
     }
 }