Python says xls file is encrypted but I can open it on windows. What is the problem?
from xlrd import *
from xlwt import *
f = open_workbook('test.xls')
Python says xls file is encrypted but I can open it on windows. What is the problem?
from xlrd import *
from xlwt import *
f = open_workbook('test.xls')
you can use the com.client instead of the xlrd module which can not handle the encrypted excel, just like this
import win32com.client
excel = win32com.client.Dispatch('Excel.Application')
workbook = excel.Workbooks.open('test.xls')
sheet = workbook.WorkSheets('sheet name')
## get the cell value
row,col = 1,1
sheet.Cells(row,col).value