hi
i have this code:
ConnectString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + ExcelFile + ";Extended Properties=\"Excel 12.0 Xml;HDR=No\"";
SheetName = SheetName.Substring(0, SheetName.Length - 5);
OleDbConnection Connection = new OleDbConnection();
Connection.ConnectionString = ConnectString;
try {Connection.Open();}
catch (Exception EX)
{
MessageBox.Show(EX.Message);
}
OleDbDataAdapter Command = new OleDbDataAdapter("SELECT * FROM [" + SheetName + "$]", Connection);
DataSet ExcelData = new DataSet();
try {Command.Fill(ExcelData);}
catch (Exception EX)
{
MessageBox.Show(EX.Message);
}
finally
{
if (Connection.State != ConnectionState.Closed)
Connection.Close();
}
but not all the data in column 1 insert - i get empty data why ? what can be wrong ?
thank's in advance