It doesn't start at Column 1 the loop is looking up the DED columns, i.e. i=1 then fieldname is 'DED1', i=2 then 'DED2' etc.
Obviously this assumes that each of the columns in the spreadsheet that you want to read are labelled 'DED1', 'DED2', 'DED3' etc.
so it will only read the 'DED' columns...