I will answer a slightly different question: "How can I write data so that Excel can read it?"
Use the csv module to write your data as a CSV file, and then open it in Excel.
import csv csvout = csv.writer(open("mydata.csv", "wb")) csvout.writerow(("Country", "Year")) for coutry, year in my_data_iterable(): csvout.writerow((country, year))
source share