Skip to content

how do I use the between condition in conditional formatting #1609

Closed Answered by xuri
CorbinAutomations asked this question in Q&A
Discussion options

You must be logged in to vote

Here are examples for highlight A1:A10 cells which value between 6 to 8 in yellow color, and you can get more details about conditional format in the documentation:

package main

import (
    "fmt"

    "github.com/xuri/excelize/v2"
)

func main() {
    f := excelize.NewFile()
    defer func() {
        if err := f.Close(); err != nil {
            fmt.Println(err)
        }
    }()
    // Light yellow format for neutral conditional.
    format, err := f.NewConditionalStyle(
        &excelize.Style{
            Font: &excelize.Font{Color: "9B5713"},
            Fill: excelize.Fill{
                Type: "pattern", Color: []string{"FEEAA0"}, Pattern: 1,
            },
        },
    )
    if 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CorbinAutomations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants