Hello,
I have a little problem with not exactly importing excel file to dgv, but with dots from excel cell which when imported to dgv changes to #
and I don' want that to change, I don't know why is that happening????
I have a cell (among many) in excel worksheet DIR. FOR IT
and when I import excel to dgv that turns to this DIR# FOR IT
WHYYYYYYYYY
I dont want it to change
my sheet looks like this
ID DIR. FOR IT
test
test1
test2
test3
my code for import is
string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""", importfileCN);
string query = String.Format("select * from [{0}]", cmbExcelSheet1.Text);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, connectionString);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
dgCN.DataSource = dataSet.Tables[0];
dgCN is datagridview and everything works, but I get the name of the column like I said, DIR# FOR IT