I asked a question here how can I read each line of a xls file with pausing and the answer is right as below
This solution goes row wise . for example if I have 3 values at first row. It prints first cell then second cell then third cell etc until the first row finish and then goes to second row.
What I want is to print all cells with a distance at the same time for example print the first row then print the second row etc
As an example, if I have in my xls file two rows as follows
row 1 : 1 2 3 (there are three values in three cell) row 2: 5 6 7
I want it prints it like
value ::: 1 ------> 2------> 3
value ::: 5-------> 6------> 7
import time
import pandas as pd
import os
import xlrd
# at first I try to know how many rows and how many columns I have
workbook = xlrd.open_workbook('myfile.xls')
for sheet in workbook.sheets():
for row in range(sheet.nrows):
for column in range(sheet.ncols):
os.system('clear')
print "value::: ", sheet.cell(row,column).value
time.sleep(5.5) # pause 5.5 seconds
this shows only one column of xls but if I have two or three columns it ignore the second and the third etc and only print the first one
how can I amend this to be able to print as many cell as I want in each epoch ?