Skip to main content
Typo corrected
Source Link

Get data

x = Import["C:\\Book1.xlsx", {"Sheets", "Sheet1"}]

Recover the integers for instance like this

y = Floor /@ x[[1]] // Flatten

(* Out[202]= {Floor["Student ID"], 2014512060, 2013512024, 2013512028} *)

Just the data are then

z = Drop[y,1]

(* Out[203]= {2014512060, 2013512024, 2013512028} *)

EDIT #1

Taking up Yves Klett's remark I entered in Excel below the IDs the number 4,99999999999999 typing it in from the Keyboard.

The import gives

x1 = {{{"Student ID"}, {2.01451*10^9}, {2.01351*10^9}, {2.01351*10^9}, {5.}}}

Extracting the number in question

x2 = x1[[1, -1, 1]]

(* Out[218]= 5. *)

It looks at first sight that the decimal positions have been lost. But this is not the case:

{Floor[#], Round[#]} &@x[[1, -1, 1]]

(* Out[216]= {4, 5} *)

Floor[] shows that they aremight be still there. And FullForm[] shows them explicitly:

FullForm[x2]

(* Out[222]//FullForm= \!\(\*
TagBox[
StyleBox["4.99999999999999`",
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\) *)

Remark: I could not persuade N[] to exhibit the decimal places but I'm sure there are better methods than FullForm.

Get data

x = Import["C:\\Book1.xlsx", {"Sheets", "Sheet1"}]

Recover the integers for instance like this

y = Floor /@ x[[1]] // Flatten

(* Out[202]= {Floor["Student ID"], 2014512060, 2013512024, 2013512028} *)

Just the data are then

z = Drop[y,1]

(* Out[203]= {2014512060, 2013512024, 2013512028} *)

EDIT #1

Taking up Yves Klett's remark I entered in Excel below the IDs the number 4,99999999999999 typing it in from the Keyboard.

The import gives

x1 = {{{"Student ID"}, {2.01451*10^9}, {2.01351*10^9}, {2.01351*10^9}, {5.}}}

Extracting the number in question

x2 = x1[[1, -1, 1]]

(* Out[218]= 5. *)

It looks at first sight that the decimal positions have been lost. But this is not the case:

{Floor[#], Round[#]} &@x[[1, -1, 1]]

(* Out[216]= {4, 5} *)

Floor[] shows that they are still there. And FullForm[] shows them explicitly:

FullForm[x2]

(* Out[222]//FullForm= \!\(\*
TagBox[
StyleBox["4.99999999999999`",
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\) *)

Remark: I could not persuade N[] to exhibit the decimal places but I'm sure there are better methods than FullForm.

Get data

x = Import["C:\\Book1.xlsx", {"Sheets", "Sheet1"}]

Recover the integers for instance like this

y = Floor /@ x[[1]] // Flatten

(* Out[202]= {Floor["Student ID"], 2014512060, 2013512024, 2013512028} *)

Just the data are then

z = Drop[y,1]

(* Out[203]= {2014512060, 2013512024, 2013512028} *)

EDIT #1

Taking up Yves Klett's remark I entered in Excel below the IDs the number 4,99999999999999 typing it in from the Keyboard.

The import gives

x1 = {{{"Student ID"}, {2.01451*10^9}, {2.01351*10^9}, {2.01351*10^9}, {5.}}}

Extracting the number in question

x2 = x1[[1, -1, 1]]

(* Out[218]= 5. *)

It looks at first sight that the decimal positions have been lost. But this is not the case:

{Floor[#], Round[#]} &@x[[1, -1, 1]]

(* Out[216]= {4, 5} *)

Floor[] shows that they might be still there. And FullForm[] shows them explicitly:

FullForm[x2]

(* Out[222]//FullForm= \!\(\*
TagBox[
StyleBox["4.99999999999999`",
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\) *)

Remark: I could not persuade N[] to exhibit the decimal places but I'm sure there are better methods than FullForm.

Import 4.99999...
Source Link

Get data

x = Import["C:\\Book1.xlsx", {"Sheets", "Sheet1"}]

Recover the integers for instance like this

y = Floor /@ x[[1]] // Flatten

(* Out[202]= {Floor["Student ID"], 2014512060, 2013512024, 2013512028} *)

Just the data are then

z = Drop[y,1]

(* Out[203]= {2014512060, 2013512024, 2013512028} *)

EDIT #1

Taking up Yves Klett's remark I entered in Excel below the IDs the number 4,99999999999999 typing it in from the Keyboard.

The import gives

x1 = {{{"Student ID"}, {2.01451*10^9}, {2.01351*10^9}, {2.01351*10^9}, {5.}}}

Extracting the number in question

x2 = x1[[1, -1, 1]]

(* Out[218]= 5. *)

It looks at first sight that the decimal positions have been lost. But this is not the case:

{Floor[#], Round[#]} &@x[[1, -1, 1]]

(* Out[216]= {4, 5} *)

Floor[] shows that they are still there. And FullForm[] shows them explicitly:

FullForm[x2]

(* Out[222]//FullForm= \!\(\*
TagBox[
StyleBox["4.99999999999999`",
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\) *)

Remark: I could not persuade N[] to exhibit the decimal places but I'm sure there are better methods than FullForm.

Get data

x = Import["C:\\Book1.xlsx", {"Sheets", "Sheet1"}]

Recover the integers for instance like this

y = Floor /@ x[[1]] // Flatten

(* Out[202]= {Floor["Student ID"], 2014512060, 2013512024, 2013512028} *)

Just the data are then

z = Drop[y,1]

(* Out[203]= {2014512060, 2013512024, 2013512028} *)

Get data

x = Import["C:\\Book1.xlsx", {"Sheets", "Sheet1"}]

Recover the integers for instance like this

y = Floor /@ x[[1]] // Flatten

(* Out[202]= {Floor["Student ID"], 2014512060, 2013512024, 2013512028} *)

Just the data are then

z = Drop[y,1]

(* Out[203]= {2014512060, 2013512024, 2013512028} *)

EDIT #1

Taking up Yves Klett's remark I entered in Excel below the IDs the number 4,99999999999999 typing it in from the Keyboard.

The import gives

x1 = {{{"Student ID"}, {2.01451*10^9}, {2.01351*10^9}, {2.01351*10^9}, {5.}}}

Extracting the number in question

x2 = x1[[1, -1, 1]]

(* Out[218]= 5. *)

It looks at first sight that the decimal positions have been lost. But this is not the case:

{Floor[#], Round[#]} &@x[[1, -1, 1]]

(* Out[216]= {4, 5} *)

Floor[] shows that they are still there. And FullForm[] shows them explicitly:

FullForm[x2]

(* Out[222]//FullForm= \!\(\*
TagBox[
StyleBox["4.99999999999999`",
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\) *)

Remark: I could not persuade N[] to exhibit the decimal places but I'm sure there are better methods than FullForm.

Source Link

Get data

x = Import["C:\\Book1.xlsx", {"Sheets", "Sheet1"}]

Recover the integers for instance like this

y = Floor /@ x[[1]] // Flatten

(* Out[202]= {Floor["Student ID"], 2014512060, 2013512024, 2013512028} *)

Just the data are then

z = Drop[y,1]

(* Out[203]= {2014512060, 2013512024, 2013512028} *)