This project is read-only.

Importing and Export Data Files

Apr 25, 2010 at 12:00 AM
Edited Apr 27, 2010 at 3:33 AM


Importing and Exporting Data

Importing data and exporting data has never been easier. Crudwork offers a library for importing and exporting most common data files. For simplicity and for interoperability, the import method reads the input data file and create a DataSet instance. And the export takes in a DataSet instance and create the output data file.

Here is a list of supported data files: 

  1. Microsoft Access, Excel and Excel 2007 files

  2. CSV / Tab delimited files

  3. DBF 4

  4. Fixed / Flat file

  5. XML File


Steps to Import File  

	var options = new DelimiterImportOptions(",");
	var ds = ImportManager.Import(@"c:\t.csv", options))

Steps to Export File

	var ds = new DataSet();

	// populate the data set...

	var options = new DelimiterImportOptions(",");
	ImportManager.Export(ds, @"c:\t.csv", options));