Exemple #1
0
 /// <summary>
 /// 转换为DataTable(文件路径+表索引)
 /// </summary>
 public static DataTable TranslateToTable(string path, int sheetIndex)
 {
     ExcelUtils utils = new ExcelUtils(path);
     return utils.ToDataTable(sheetIndex);
 }
Exemple #2
0
 /// <summary>
 /// 转换为DataTable(文件路径)
 /// </summary>
 public static DataTable TranslateToTable(string path)
 {
     ExcelUtils utils = new ExcelUtils(path);
     return utils.ToDataTable(0);
 }
Exemple #3
0
 /// <summary>
 /// 转换为DataTable(内存流+表索引)
 /// </summary>
 public static DataTable TranslateToTable(System.IO.Stream stream, int sheetIndex)
 {
     ExcelUtils utils = new ExcelUtils(stream);
     return utils.ToDataTable(sheetIndex);
 }
Exemple #4
0
 /// <summary>
 /// 转换为DataTable(内存流)
 /// </summary>
 public static DataTable TranslateToTable(System.IO.Stream stream)
 {
     ExcelUtils utils = new ExcelUtils(stream);
     return utils.ToDataTable(0);
 }
Exemple #5
0
 /// <summary>
 /// 转换为DataTable(内存流+表名)
 /// </summary>
 public static DataTable TranslateToTable(System.IO.Stream stream, string sheetName)
 {
     ExcelUtils utils = new ExcelUtils(stream);
     return utils.ToDataTable(sheetName);
 }
Exemple #6
0
        /// <summary>
        /// 转换为DataTable(内存流)
        /// </summary>
        public static DataTable TranslateToTable(System.IO.Stream stream)
        {
            ExcelUtils utils = new ExcelUtils(stream);

            return(utils.ToDataTable(0));
        }
Exemple #7
0
        /// <summary>
        /// 转换为DataTable(内存流+表名)
        /// </summary>
        public static DataTable TranslateToTable(System.IO.Stream stream, string sheetName)
        {
            ExcelUtils utils = new ExcelUtils(stream);

            return(utils.ToDataTable(sheetName));
        }
Exemple #8
0
        /// <summary>
        /// 转换为DataTable(文件路径)
        /// </summary>
        public static DataTable TranslateToTable(string path)
        {
            ExcelUtils utils = new ExcelUtils(path);

            return(utils.ToDataTable(0));
        }
Exemple #9
0
        /// <summary>
        /// 转换为DataTable(文件路径+表索引)
        /// </summary>
        public static DataTable TranslateToTable(string path, int sheetIndex)
        {
            ExcelUtils utils = new ExcelUtils(path);

            return(utils.ToDataTable(sheetIndex));
        }