Skip to content

duanshuaimin/NDbfReader

 
 

Repository files navigation

NDbfReader

NDbfReader is a .NET library for reading dBASE (.dbf) files. The library is simple, extensible and without any external dependencies.

Example

using (var table = Table.Open("D:\\foo.dbf"))
{
   // default is ASCII encoding
   var reader = table.OpenReader(Encoding.GetEncoding(1250));
   while(reader.Read())
   {
     var name = reader.GetString("NAME");
     //...
   }
}

An entire table can be loaded into a DataTable:

using (var table = Table.Open("D:\\foo.dbf"))
   return table.AsDataTable();

Non-seekable (forward-only) streams are also supported:

[HttpPost]
public ActionResult Upload(HttpPostedFileBase file)
{
   using (var table = Table.Open(file.InputStream))
   //..
}

NuGet

Install-Package NDbfReader

Source

Clone the repository and run build.cmd. At least Visual Studio Community 2015 is required.

Tests

Run run-tests.cmd.

Run test-coverage.cmd to calculate test coverage with OpenCover.

License

MIT

About

Simple reader of DBF files for .NET

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.1%
  • Batchfile 0.9%