Davorak's answer is correct if you need to import the entire CSV file as an array. However, if you have one line to convert from C / Fortran exponential notation, you can use ImportString with different arguments for the format. As an example there
In[1]:= ImportString["1.0e6", "List"] Out[1]= {1.*^6}
The operator *^ equivalent to Mathematica for e . Please note that this is also a good way to split lines that are in CSV form:
In[2]:= ImportString["1.0e6,3.2,foo", "CSV"] Out[2]= {{1.*10^6,3.2,foo}}
In both cases, you will receive your answer wrapped in an additional level of list structure, which is quite easy to handle. However, if you are really sure that you have only one number, you can turn the string into a stream and use Read . This is cumbersome enough that I stuck with ImportString , however:
In[3]:= Module[{stream = StringToStream["1.0e6"], number}, number = Read[stream, "Number"]; Close[stream]; number] Out[3]= 1.*10^6
source share