set_custom方法

set_custom(self, custom, builtin_preference)

设置单元格的自定义数字格式字符串。


def set_custom(self, custom, builtin_preference):
    ...
范围类型描述
customstr自定义数字格式字符串,应为InvariantCulture模式。
builtin_preferencebool如果给定的自定义数字格式字符串与内置数字格式之一匹配
对应当前区域设置,是否将数字格式设置为内置格式而不是自定义格式。

也可以看看