每次用魔法指令,希望输入为excel对象,常常出来的结果都是输入一个excel路径。

或者就算出了excel对象,执行起来也会报错,如下:
'OfficeWorkBook' object has no attribute 'sheets'
这个错误提示表示你正在尝试访问 'OfficeWorkBook' 对象的 'sheets' 属性,但这个对象并没有这个属性。
'WpsWorkBook' object is not subscriptable
你的错误提示 "TypeError: 'WpsWorkBook' object is not subscriptable" 表示你正在尝试对一个 'WpsWorkBook' 对象进行下标访问,但是这个对象并不支持这种操作。