- fields = %w(person_type first_name last_name name short_name email phone fax mobile skype www twitter legal_form capital immatriculation_number_1 immatriculation_number_2 european_union_vat_number address.street address.street_bis address.city address.zip address.country) doctype xml Workbook( xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" ) Worksheet ss:Name=Dorsale::CustomerVault::Person.ts Table Row - fields.each do |field| Cell: Data ss:Type="String" = Dorsale::CustomerVault::Person.t(field) - @people_without_pagination.each do |person| Row - fields.each do |field| Cell: Data ss:Type="String" - if field.include?("address.") = person.address.public_send(field.gsub("address.", "")) - else = person.public_send(:try, field)