using System;
using System.IO;
using System.Data;
using Oracle.ManagedDataAccess.Client;
using System.Data.OleDb;
using System.Data.Odbc;
using System.Data.SqlClient;
using BP.Difference;
namespace BP.DA
{
///
/// DBLoad 的摘要说明。
///
public class DBLoad
{
///
/// 装载
///
public DBLoad()
{
}
///
/// 按照顺序获得名字
///
///
///
///
public static string GenerTableNameByIndex(string fileName, int index)
{
return DA_DbLoad.GenerTableNameByIndex(fileName, index);
}
///
/// 获得名字集合
///
///
///
public static string[] GenerTableNames(string fileName)
{
return DA_DbLoad.GenerTableNames(fileName);
}
///
/// 获得excel文件中的数据,按照指定顺序号的idx.
///
/// 绝对文件路径
/// 顺序号
/// 返回数据
public static DataTable ReadExcelFileToDataTable(string fileFullName, int sheetIdx = 0)
{
string tableName = GenerTableNameByIndex(fileFullName, sheetIdx);
return ReadExcelFileToDataTableBySQL(fileFullName, tableName);
}
///
/// 通过文件,sql ,取出Table.
///
///
///
///
public static DataTable ReadExcelFileToDataTableBySQL(string filePath, string tableName)
{
return DA_DbLoad.ReadExcelFileToDataTableBySQL(filePath, tableName);
}
}
}