可以过滤,前提是你的文件格式是xls,xlsx不可以
记得加formatting_info=True,加上这个读出来的才是带格式的
代码为
wb=xlrd.open_workbook(file, formatting_info=True)
wb_sheet = wb.sheet_by_index(0)
hidden = wb_sheet.rowinfo_map[row_idx].hidden
本文介绍如何使用Python的xlrd库读取Excel(.xls)文件,并通过设置formatting_info参数为True来获取文件的格式信息。特别地,文章提供了代码示例,展示了如何判断并过滤工作表中的隐藏行。
可以过滤,前提是你的文件格式是xls,xlsx不可以
记得加formatting_info=True,加上这个读出来的才是带格式的
代码为
wb=xlrd.open_workbook(file, formatting_info=True)
wb_sheet = wb.sheet_by_index(0)
hidden = wb_sheet.rowinfo_map[row_idx].hidden

被折叠的 条评论
为什么被折叠?