public static string GetExcelFirstTableName(string connectstring) { string excelFirstTableName; using (OleDbConnection oleDbConnection = new OleDbConnection(connectstring)) { excelFirstTableName = MdExcelHelper.GetExcelFirstTableName(oleDbConnection); } return(excelFirstTableName); }
/// <summary> /// 返回Excel第一个工作表表名 /// </summary> /// <param name="excelPath"></param> /// <param name="eType"></param> /// <returns></returns> public static string GetExcelFirstTableName(string excelPath, MdExcelHelper.ExcelType eType) { string excelConnectstring = MdExcelHelper.GetExcelConnectstring(excelPath, true, eType); return(MdExcelHelper.GetExcelFirstTableName(excelConnectstring)); }