I am making another application for Windows forms, but some strange things are happening, the first example I have is 0076464688334, in my excel sheet I read them with.
MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;Data Source='" + fileName + "';Extended Properties=Excel 12.0;"); MyConnection.Open(); myCommand.Connection = MyConnection; DataSet ds = new DataSet(); String qry = "SELECT number FROM [Sheet1$]"; OleDbDataAdapter odp = new OleDbDataAdapter(qry, MyConnection); odp.Fill(ds);
NO, when I have all the values ββin the dataset, I loop them, but the problem is that the value mentioned above, everyone who has a zero in front becomes similar.
0076464688334 = 76464688334
I kind on replaces 0 with% 0 and in code% 0 with 0, and he solved, now another problem is that I have a value that it becomes ...
824968717929 = 8.2496871793e+011
These are barcodes, and I need an exact match, I canβt find how to solve them, please help :).
Thanks in advance to everyone ..
Additional code:
for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (ds.Tables[0].Rows[i][0].ToString() != "" ) { googleList.Add(ds.Tables[0].Rows[i][0].ToString().Replace("%0", "0")); // EbayList.Add(ds.Tables[0].Rows[i][0].ToString()); string tmp = string.Empty; tmp = ds.Tables[0].Rows[i][0].ToString().Replace("%0","0");
source share