创建条件格式
POST {{base_url}}/sheets/v2/spreadsheets/:spreadsheetToken/condition_formats/batch_create
该接口用于创建新的条件格式,单次最多支持增加10个条件格式,每个条件格式的设置会返回成功或者失败,失败的情况包括各种参数的校验。
参考接口文档:创建条件格式
Request Body
{"sheet_condition_formats"=>[{"sheet_id"=>"1QXD0s", "condition_format"=>{"ranges"=>["1QXD0s!C3:D9"], "rule_type"=>"uniqueValues", "style"=>{"font"=>{"bold"=>true, "italic"=>true}, "fore_color"=>"#faf1d1", "back_color"=>"#d9f5d6", "text_decoration"=>3}}}]}
RESPONSES
status: OK
{"code":0,"data":{"responses":[{"cf_id":"l1vSea0Dd7","res_code":0,"res_msg":"success","sheet_id":"1QXD0s"}]},"msg":"success"}