def write_branch_data(self, file):
        """ Writes branch data to an Excel spreadsheet.
        """
        branch_sheet = self.book.add_sheet("Branches")

        for i, branch in enumerate(self.case.branches):
            for j, attr in enumerate(BRANCH_ATTRS):
                branch_sheet.write(i, j, getattr(branch, attr))
Writes branch data to an Excel spreadsheet.