// public DataTable GetTableFromTextFile(string path, string delim, bool header, // bool footer, int lines_in, int definition_line ) // { // string file_only = Path.GetFileName(path); // string path_only = path.Replace(file_only, ""); // var tdl = new TextDataLink(path_only, delim.ToCharArray(), header, footer, lines_in, definition_line); // return tdl.GetData(file_only); // } // public DataTable GetTableFromTextFile(string path, string delim, // int header_line, int footer_line) // { // string path_only; // string file_only = parse_file_path(path, out path_only); // var tdl = new TextDataLink(path_only, delim.ToCharArray(), header_line, footer_line); // return tdl.GetData(file_only); // } // private static string parse_file_path(string path, out string path_only) // { // string file_only = Path.GetFileName(path); // path_only = path.Replace(file_only, ""); // return file_only; // } // public DataTable GetTableFromExcelFile(string path, string header, // string sheet_name, int sheet_ndx) // { // var xdl = new ExcelDataLink(path, sheet_name, header, sheet_ndx); // return xdl.GetData(); // } public DataTable GetTableFromFolder(string path, string mask, DateTime cutoff) { var fsds = new FileSystemDataSet(path,mask,cutoff.ToString()); return fsds.Table; }
// public DataTable GetTableFromTextFile(string path, string delim, bool header, // bool footer, int lines_in, int definition_line ) // { // string file_only = Path.GetFileName(path); // string path_only = path.Replace(file_only, ""); // var tdl = new TextDataLink(path_only, delim.ToCharArray(), header, footer, lines_in, definition_line); // return tdl.GetData(file_only); // } // public DataTable GetTableFromTextFile(string path, string delim, // int header_line, int footer_line) // { // string path_only; // string file_only = parse_file_path(path, out path_only); // var tdl = new TextDataLink(path_only, delim.ToCharArray(), header_line, footer_line); // return tdl.GetData(file_only); // } // private static string parse_file_path(string path, out string path_only) // { // string file_only = Path.GetFileName(path); // path_only = path.Replace(file_only, ""); // return file_only; // } // public DataTable GetTableFromExcelFile(string path, string header, // string sheet_name, int sheet_ndx) // { // var xdl = new ExcelDataLink(path, sheet_name, header, sheet_ndx); // return xdl.GetData(); // } public DataTable GetTableFromFolder(string path, string mask, DateTime cutoff) { var fsds = new FileSystemDataSet(path, mask, cutoff.ToString()); return(fsds.Table); }