LinqToExcel
LinqToExcel copied to clipboard
LinqToExcel data retrieval problem
I have a csv File in which the 5th column contains mixed types.
When i query this through LinqToExcel
var excel = new ExcelQueryFactory(@"C:\Dataloader\2.csv");
var AcountAttributes = from AA in excel.Worksheet(0)
select AA;
it doesn't return data for the column when the value is text? What am i doing wrong?
Thanks Paul
I am having the same issue.. any fix?
Also having same issue.
I think this happens because ACE and JET sample the column to determine a type before the data gets to LinqToExcel. Usually I would expect it to take to type it finds from the top rows but maybe here it's determined that the column is integers and so omits values that it can't convert.
i am also facing same issue. Any fix?
I have had this issue as well. Astrophizz is correct that it attempts to determine the type, i cannot find the article... but I recall that it does some "Magic" on the first 10 rows of a column to determine the Type.. The only way that I have resolved it is to make sure the Excel columns themselves are specifically set to "Text". And in the Code itself, i always treat them as a string and then convert them.
As @MorbidKoder mentioned, that was the solution I needed to use as well.
I am having Text column in Excel with numbers in it. "Number" in cca 280 row has value 3;4 and I am getting NUll. How someone can force data to be read as text/string not integers/numbers? Having column set to Text and numbers aligned to left does not solve my problem.
I am having Text column in Excel with numbers in it. "Number" in cca 280 row has value 3;4 and I am getting NUll. How someone can force data to be read as text/string not integers/numbers? Having column set to Text and numbers aligned to left does not solve my problem.
I have te same Problem!!
i knocked into same problem. Any attributes to denote a type of column
Me too