python 使用xlrd操作excel中xls与xlsx问题

python 使用xlrd操作excel建议操作xls

如果是xlsx不要简单修改后缀名,建议使用wps或者office工具修改为.xls

 


from xlrd import open_workbook  # 调用读Excel的第三方库xlrd

#  这里是为了原格式打开excel,但是如果是xlsx 或者修改成xls不正确,会报错

file = open_workbook(xls_path, formatting_info=True)  # 打开用例Excel

NotImplementedError: formatting_info=True not yet implemented

 

所以:

 建议使用xls。记住修改方式不要错

你可能感兴趣的:(python)