public static DataTable FL_get_OnlyDatatableForDbf_variableQuery(string dbfFilepathWithNameAndExtension, String query) { FileInfo fileInfo = new FileInfo(dbfFilepathWithNameAndExtension); string constring = FL_Dbf_Manager.FL_dbf_constring(dbfFilepathWithNameAndExtension); string sWithoutExt = Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension); DataTable dt = FL_Oledb_Helper.FL_Oledb_Manager.FL_get_oledb_datatable(constring, query); return(dt); }
public static void FL_data_to_xls(string dbfFilepathWithNameAndExtension) { string constring = FL_Dbf_Manager.FL_dbf_constring(dbfFilepathWithNameAndExtension); string sWithoutExt = Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension); string query = "SELECT * FROM " + sWithoutExt; DataTable dt = FL_Oledb_Helper.FL_Oledb_Manager.FL_get_oledb_datatable(constring, query); FL_DataTableToExcel_Helper.FL_DataTableToExcel(dt, Path.GetDirectoryName(dbfFilepathWithNameAndExtension) + @"\" + Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension)); }
public static DataSet FL_get_only_dataset_for_dbf(string dbfFilepathWithNameAndExtension) { FileInfo fileInfo = new FileInfo(dbfFilepathWithNameAndExtension); string constring = FL_Dbf_Manager.FL_dbf_constring(dbfFilepathWithNameAndExtension); string sWithoutExt = Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension); string query = "SELECT * FROM " + sWithoutExt; DataSet ds = FL_Oledb_Helper.FL_Oledb_Manager.FL_get_oledb_dataset(constring, query); return(ds); }
public static DataTable FL_data_to_xls_with_datatable(string dbfFilepathWithNameAndExtension) { FileInfo fileInfo = new FileInfo(dbfFilepathWithNameAndExtension); string constring = FL_Dbf_Manager.FL_dbf_constring(dbfFilepathWithNameAndExtension); string sWithoutExt = Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension); string query = "SELECT * FROM " + sWithoutExt; DataTable dt = FL_Oledb_Helper.FL_Oledb_Manager.FL_get_oledb_datatable(constring, query); FL_Excel_Data_Interop.FL_DataTableToExcel_Helper.FL_DataTableToExcel(dt, Path.GetDirectoryName(dbfFilepathWithNameAndExtension) + @"\" + Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension)); return(dt); }
public static void FL_data_to_xls(string query, string constring1 = null, string dbfFilepathWithNameAndExtension = null) { if (string.IsNullOrEmpty(dbfFilepathWithNameAndExtension)) { DataTable dt = FL_Oledb_Helper.FL_Oledb_Manager.FL_get_oledb_datatable(constring1, query); var filename = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\" + dt.TableName; FL_Excel_Data_Interop.FL_DataTableToExcel_Helper.FL_DataTableToExcel(dt, filename); } else { string constring = FL_Dbf_Manager.FL_dbf_constring(dbfFilepathWithNameAndExtension); string sWithoutExt = Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension); DataTable dt = FL_Oledb_Helper.FL_Oledb_Manager.FL_get_oledb_datatable(constring, query); FL_Excel_Data_Interop.FL_DataTableToExcel_Helper.FL_DataTableToExcel(dt, Path.GetDirectoryName(dbfFilepathWithNameAndExtension) + @"\" + Path.GetFileNameWithoutExtension(dbfFilepathWithNameAndExtension)); } }