I am trying to implement FILEHELPER 2.0 in my project , but some csv file with "" quoted facing problem . and it is showing error ( the error log showing this )
**" LineNumber | LineString |ErrorDescription 2|"Symbol","Date","Expiry","Strike Price","Open","High","Low","Close","LTP","Settle Price","No. of contracts","Turnover in Lacs","Open Int","Change in OI","Underlying Value "|Length cannot be less than zero. -> Parameter name:Length cannot be less than zero. -> Parameter name: length 3|" **
and my code goes like this :
var engine = new FileHelperEngine<script>();
engine.Options.IgnoreFirstLines = 1; // skipping the header line
script[] res = engine.ReadFile("agile.csv"); <<<<< at this line error occred
and my class file :
[DelimitedRecord(",")]
public class script
{
[FieldQuoted('"', QuoteMode.AlwaysQuoted)]
public string Symbol;
[FieldQuoted('"', QuoteMode.AlwaysQuoted)]
public string Date;
[FieldQuoted('"', QuoteMode.AlwaysQuoted)]
public string Expiry;
[FieldQuoted('"', QuoteMode.AlwaysQuoted)]
...
}
and csv file is .
"Symbol","Date","Expiry","Strike Price","Open","High","Low","Close","LTP","Settle Price","No. of contracts","Turnover in Lacs","Open Int","Change in OI","Underlying Value "
"NIFTY","31-Aug-2012","27-Sep-2012"," 5400.00"," 56.00"," 56.90"," 38.05"," 44.45"," 43.55"," 44.45"," 281087"," 765592.77"," 4845150"," 1334150"," 5258.50"