#!/usr/bin/env python import sys import codecs # needed to be able to pipe output sys.stdout = codecs.getwriter('utf8')(sys.stdout) from xlrd import open_workbook book = open_workbook('test_data.xls') sheet = book.sheet_by_index(0) for row in range(sheet.nrows): line = [sheet.cell(row,col).value for col in range(4)] print " ".join(line)