更新条件格式

POST {{base_url}}sheets/v2/spreadsheets/:spreadsheetToken/condition_formats/batch_update

该接口用于更新已有的条件格式,单次最多支持更新10个条件格式,每个条件格式的更新会返回成功或者失败,失败的情况包括各种参数的校验。

参考接口文档:更新条件格式

Request Body

{"sheet_condition_formats"=>[{"sheet_id"=>"1QXD0s", "condition_format"=>{"cf_id"=>"l1vSea0Dd7", "rule_type"=>"uniqueValues", "ranges"=>["1QXD0s!C3:D9"], "style"=>{"font"=>{"bold"=>true, "italic"=>true}, "fore_color"=>"#faf1f2", "back_color"=>"#46f5d6", "text_decoration"=>2}}}]}

RESPONSES

status: OK

{"code":0,"data":{"responses":[{"cf_id":"l1vSea0Dd7","res_code":0,"res_msg":"success","sheet_id":"1QXD0s"}]},"msg":"success"}