I have an Excel spreadsheet with, among onther things, numbers that are identifiers.
My odbc reader should return me something like '55201562000016', but too often it returns me something like '5.52016e+008'.
I only do the following, but apparently it does not suffice to tell the reader that it should be treated as a string and not an exponential integer :
siren = rdrxls("entr_siren").ToString().Trim()
siret = rdrxls("entr_siret").ToString().Trim()
I have tried this :
siren = Convert.ToInt64(rdrxls("entr_siren")).ToString().Trim()
siret = Convert.ToInt64(rdrxls("entr_siret")).ToString().Trim()
It should work, but sometimes it throws exceptions, because sometimes the data is erroneous (with letters for example) ; but I still need to fetch it.
Any idea ?
Thanks