Hi,
I'm using oledbconnection to retreive the records from excel. Here are
the steps that i'm currently following.
DataTable dt = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,
null);
if (dt == null)
return null;
string[] excelSheets= new string[dt.Rows.Count ];
int i=0;
foreach (DataRow row in dt.Rows)
{
excelSheets[i] = row["TABLE_NAME"].ToString();
cmd= new OleDbCommand();
cmd.CommandText ="select * from [" +
excelSheets[i] + "]";
dbDataAdp = new OleDbDataAdapter(cmd.CommandText ,
conn);
DataTable dtNew = new DataTable(excelSheets[i]);
dbDataAdp.Fill(dtNew);
ds.Tables.Add(dtNew);
i++;
}
I might have a situation where in there will be 1000 sheets and each
sheet might have 65000 records. Can you please let me know the best
practices that i can follow making sure that memory and performance
issues can be taken care of ?
Any help or reference is highly appreciated.
Thank you,
Ratnakar.