Incorporating changes, suggested by Michael Rans. Changes are mainly to support the Excel XML format.