I'd think a bit about what you want in your output and parse it directly from BioPython.
in your script you probably have a line something like
result_handle = NCBIWWW.qblast("blastn", "nt", ...)
this row fetches the xml result from NCBI that you're writing to file.
Instead of just writing it to an xml file though, we can parse it!
start by importing NCBI's XML-parser
from Bio.Blast import NCBIXML
now we can make a parser object!
try somthing like:
blast_records = NCBIXML.parse(result_handle)
for record in blast_records:
print record.query
for alignment in record.alignments:
print alignment.title
print alignment.hit_id
print alignment.hit_def
for hsp in alignment.hsps:
print hsp.score
print hsp.bits
print hsp.expect
print hsp.query
print hsp.match
print hsp.sbjct
to get a feeling of what information you can get out of the blast and decide what you'd like in your excel sheet.
Then save it as csv (comma-separated-values, a file-format you can open in excel).
something like this:
separator = ","
header = ['title', 'hit_id', 'score', 'e-value', ...]
with open("my-output.csv", 'w') as f:
f.write( "%s\n" % (separator.join(header)) )
for record in blast_records:
for hsp in alignment.hsps:
f.write( "%s%s" % (print alignment.title, separator) )
f.write( "%s%s" % (print alignment.hit_id, separator) )
f.write( "%s%s" % (print hsp.score, separator) )
f.write( "%s%s" % (print hsp.expect, separator) )
:
f.write( "\n" )
I haven't tested this code, but the principle should be fairly sound.
You could ask BLAST to give you tabular output - which is easy to work with in Excel and in Python.