Example #1
0
 /// <summary>
 /// Returns a DataTable from a CSV file
 /// </summary>
 static public DataTable FromCSV(string csvPath, char?separator = null, Encoding encoding = null)
 {
     if (encoding == null)
     {
         encoding = Encoding.Default;
     }
     return(ExcelHelper.LoadDataTableFromCSV(csvPath, separator, encoding));
 }
Example #2
0
        public DataTable LoadDataTableFromCSV(string csvPath, char?separator = null)
        {
            if (MyLoadDataTableFromCSV != null)
            {
                return(MyLoadDataTableFromCSV(csvPath, separator));
            }

            return(ExcelHelper.LoadDataTableFromCSV(csvPath, separator, DefaultEncoding));
        }