MikeStall / DataTable

Class library for working with tabular data, especially CSV files
Apache License 2.0
150 stars 63 forks source link

Support for files without headers #10

Closed ti24horas closed 11 years ago

ti24horas commented 11 years ago

I saw in the code that you jumps the first line supposing that the first line is a line header.

Is it hard to change that? Can you provide me directions on how to to that?

MikeStall commented 11 years ago

I think it’s pretty feasible.

  1. Add an appropriate overload to DataTableBuilder.cs that takes in a “string[] columnHeaders”. This is where the construction functions are (for discoverability). Maybe something like: DataTableBuilder.New.ReadLazy(TextReader stream, );
  2. And then plumb the headers through to Reader.cs If you’re doing a Lazy version, you’ll probably end up in TextReaderDataTable.
  3. Add a unit test!

From: Rafael Nicoletti Sent: Wednesday, May 01, 2013 5:45 PM To: MikeStall/DataTable Subject: [DataTable] Support for files without headers (#10)

I saw in the code that you jumps the first line supposing that the first line is a line header.

Is it hard to change that? Can you provide me directions on how to to that?

— Reply to this email directly or view it on GitHub.

ti24horas commented 11 years ago

Hi, After almost two months, I will start this modification OK. So for anyone who wants this, in some days (following monday 07/08/2013) this will be done.

MikeStall commented 11 years ago

Thanks for making the changes and adding the unit tests. I've pulled them back in.

ti24horas commented 11 years ago

Hi Mike, When will this changes made available in nuget?

Oh, and thanks for the effort in made those changes available in main branch so soon!

MikeStall commented 11 years ago

I just went ahead and published it as 1.0.9. https://nuget.org/packages/CsvTools

Should be available now! Thanks for your contribution.

From: Rafael Nicoletti [mailto:notifications@github.com] Sent: Friday, July 5, 2013 11:39 AM To: MikeStall/DataTable Cc: Mike Stall Subject: Re: [DataTable] Support for files without headers (#10)

Hi Mike, When will this changes made available in nuget?

Oh, and thanks for the effort in made those changes available in main branch so soon!

— Reply to this email directly or view it on GitHub https://github.com/MikeStall/DataTable/issues/10#issuecomment-20533207 . https://github.com/notifications/beacon/HXdS1yks856QKKPYD0KPG6jdvpgY8Soqt_UtJb5ie55zg__PyuIzcZypDRfzK0DC.gif

ti24horas commented 11 years ago

OK, thanks very much!