求问大佬们,我这怎么报错呢,看不懂了
格式问题,你直接使用scandir 读出来的数据类型是
<class 'nt.DirEntry'>
需要使用 name 将其转为字符串形式再 进行 endswith 操作
i.name.endswith(".xlsx")