Determine if worksheet is empty in openpyxl

冷暖自知 提交于 2019-12-01 14:08:29

The only reliable way to determine if a worksheet is "empty" is to look at the _cells attribute. However, this is part of the internal API and liable to change. In fact it is almost certain to change.

The max_row and max_column attributes are used internally for counters and must be 1 or more.

A feature request without relevant code and tests would be rejected and I'm fairly sceptical about the idea of "empty" worksheet in general.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!