G
Guest
Hi,
when I load a CSV file into a DataSet, and try to display it in a gridView,
it clearly only displays the first column.
what am i forgetting?
this is my code
OleDbConnection ExcelConnection = new
OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathName +
";Extended Properties='text;HDR=No;FMT=Delimited'");
//
OleDbCommand ExcelCommand = new OleDbCommand(@"SELECT * FROM " +
fileName, ExcelConnection);
OleDbDataAdapter ExcelAdapter = new OleDbDataAdapter(ExcelCommand);
ExcelConnection.Open();
DataSet ExcelDataSet = new DataSet();
ExcelAdapter.Fill(ExcelDataSet);
ExcelConnection.Close();
return ExcelDataSet;
when I load a CSV file into a DataSet, and try to display it in a gridView,
it clearly only displays the first column.
what am i forgetting?
this is my code
OleDbConnection ExcelConnection = new
OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathName +
";Extended Properties='text;HDR=No;FMT=Delimited'");
//
OleDbCommand ExcelCommand = new OleDbCommand(@"SELECT * FROM " +
fileName, ExcelConnection);
OleDbDataAdapter ExcelAdapter = new OleDbDataAdapter(ExcelCommand);
ExcelConnection.Open();
DataSet ExcelDataSet = new DataSet();
ExcelAdapter.Fill(ExcelDataSet);
ExcelConnection.Close();
return ExcelDataSet;