auto_fit_column方法

auto_fit_column(self, column_index)

自动调整列宽。


def auto_fit_column(self, column_index):
    ...
范围类型描述
column_indexint列索引。

注意事项

AutoFitColumn 是一个不精确的函数。

auto_fit_column(self, column_index, first_row, last_row)

自动调整列宽。


def auto_fit_column(self, column_index, first_row, last_row):
    ...
范围类型描述
column_indexint列索引。
first_rowint第一行索引。
last_rowint最后一行索引。

注意事项

此方法根据行内单元格范围的内容自动调整行。

也可以看看