I have created a method in c# which takes a file name as a parameter and returns a OledbDataReader to read excel spreadsheets. Somehow this oledbreader is returning 26 rows only. I tried to delete first 50 rows and still it returns 26 rows only. I have morethan
250 rows in the spreadsheet.
code 1:
leDbConnection OleConExcel = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
+ FileName + "; Extended Properties=Excel 12.0 Xml;");
OleDbCommand OleCmdExcel = new OleDbCommand("SELECT * FROM [Sheet1$]", OleConExcel);
try { OleConExcel.Open();
OleDbDataReader odr = OleCmdExcel.ExecuteReader();
ProcessReader(guid, odr);}
code 2:
public static void ProcessReader(string guid, OleDbDataReader odr)
{
string ConnectionString = System.Configuration.Configurat ...
Go to the complete details ...