resort by line to ensure parent precedes daughter in spreadsheet