2

I am importing data from Excel with the code Import["/Users/....\ xlsx"] and I what I get is a list such as {0., 6., 11., 14., 16., 21., 22., 25., 32., 33., 34., 46., 61., 70., \ 73., 78., 88., 89., 90., 95.}

Why do the numbers have a dot after? This is causing some problems when I am trying to analyze the data, since SameQ[61., 61] gives false.

Any ideas on how to import the numerical values only?

FelipeAmorim
  • 187
  • 5
  • 1
    I do not have excel, but isn't real numbers how excel internally store these as? any way, you could also always make these numbers exact after importing them. something like = {0., 6., 11., 14., 16., 21., 22., 25., 32., 33., 34., 46., 61.,70., 73., 78., 88., 89., 90., 95.}; then SetAccuracy[L, Infinity] which gives {0, 6, 11, 14, 16, 21, 22, 25, 32, 33, 34, 46, 61, 70, 73, 78, 88, 89, 90, 95} screen shot Mathematica graphics – Nasser Dec 26 '22 at 21:18
  • There seems to be similar question here also importing-numbers-from-excel – Nasser Dec 26 '22 at 21:21
  • This too With[{r = Round[#]}, r + Chop[# - r]] & /@ Import["/Users/....\ xlsx"] – Chris Degnen Dec 26 '22 at 21:42
  • Thank you for the answers! Round or Floor do what I wanted!! – FelipeAmorim Dec 27 '22 at 01:02

0 Answers0