0

i m constantly getting error while using Csv Parser ( File helper ) . it asking some attribute set for to avoid empty. but i am totally clue less what to do .

how to set "IgnoreEmptyLines" in class ?

my sample csv file is and this is server generated csv file :

    Date,Open,High,Low,Close,Volume,AdjClose
    2012-08-31,5298.20,5303.25,5238.90,5258.50,000,5258.50

The error is , The line 2 is empty. Maybe you need to use the attribute [IgnoreEmptyLines] in your record class.

panindra
  • 626
  • 2
  • 11
  • 31

1 Answers1

3

if 'Stock' is your public class then ,you must top at the top

 [DelimitedRecord(",")]
    [IgnoreEmptyLines()]
    public class Stock
    {
        public string Date;
        public string Open;
        public string High;
        public string Low;
        public string Clos;
        public string Volume;
        public string AdjClose;

    }
Vishwa
  • 110
  • 1
  • 9
  • I strongly recomend you that use the last version of the library from: [Stable Build](http://teamcity.codebetter.com/viewLog.html?buildId=lastSuccessful&buildTypeId=bt66&tab=artifacts&guest=1) – Marcos Meli Sep 02 '12 at 21:26
  • 1
    @MarcosMeli thank you very much for latest library , i thought this project is old and no one is concerned about it. Thanks for giving .net4.0 . thumbs up. Auto detecting Headers in Wizard is superb option to include in the wizard . – Vishwa Sep 03 '12 at 12:51
  • We are trying to release version 3.0 but is hard to get time and forces to do it :) You can check the pending issues here: http://filehelpers.myjetbrains.com/youtrack/rest/agile/FH/sprint/3.0?q=%23Unresolved And code on github: https://github.com/MarcosMeli/FileHelpers We need some help in autodetection and the new demos, wanna help us ? send me a mail to marcos (a) filehelpers.com – Marcos Meli Sep 04 '12 at 20:15