I am trying to export a range of cells in a column using:
Import["BCD.xls", {"Sheets", "HazardRate", {15, 16, 17, 18, 19}, 3} ]
which works fine as data is what I expected, but why doesn't this for-loop work, and why Mathematica does not return errors or output?
For[j = 15, j <= 19, j++, Import["BCD.xls", {"Sheets", "HazardRate", j, 3} ] ]
Returnis used, the value returned byForisNull. See also the tutorial Loops and Control Structures – kguler Oct 25 '12 at 23:41Import["BCD.xls", {"Sheets", "HazardRate", #, 3} ]&/@Range[15,19]might be what you are after. – image_doctor Oct 26 '12 at 0:03Import["BCD.xls", {"Sheets", "HazardRate", Range[15,19], 3}]– Cameron Murray Oct 26 '12 at 7:15