I import an excel file
c1 c2 c3
1 3 5
2 4 6
fp = NotebookDirectory[] <> "Book1.xls";
excelSheet = Import[fp] [[1]];
t1 = Grid[excelSheet, Frame -> All, Alignment -> Left,
Background -> {None, {Gray, {White, LightGray}}}
The table shows each number with a "." at the end :( How do I get rid of it?
c1 c2 c3
1. 3. 5.
2. 4. 6.
Thanx
Solution:
For[i = 1, i <= Length[excelSheet], i++,
For[j = 1, j <= Length[excelSheet[[i]]], j++,
If[NumericQ[excelSheet[[i, j]]],
excelSheet[[i, j]] = Round[excelSheet[[i, j]]];
];
];
];
Comments
Post a Comment