set_custom方法

set_custom(custom, builtin_preference)

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

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

也可以看看