Hello dear developers, I have a small problem, it turns out that I am reading excel sheets in a console program and I play an excel that has a lot of columns (Until the column ABT) and my excel dataset only reads up the column WZ and I do not know how to get him to read the whole sheet without leaving any column out. I have to do it in OLEDB because of my client's license issues. Here the code
OleDbConnection Econ;
Econ = new OleDbConnection(constr);
string qTotal = string.Format("Select * from[Sheet1$]");
string qTotalvalores = string.Format("Select * from[Sheet1$A12:ABT755]");
OleDbCommand ETotal = new OleDbCommand(qTotal, Econ);
OleDbCommand Etotal2 = new OleDbCommand(qTotalvalores, Econ);
termino = termino + 1;
Econ.Open(); //al procesar el archivo n° 120 //Se cae la conexion en Econ.Open();
// Creacion de Dataset para cada uno de los contructores
DataSet dsTotal = new DataSet();
DataSet dsTotal2 = new DataSet();
OleDbDataAdapter odaTotal = new OleDbDataAdapter(qTotal, Econ);
OleDbDataAdapter odaTotal2 = new OleDbDataAdapter(qTotalvalores, Econ);
Econ.Close();