-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Description
I am trying to use the conditional formatting feature and create some data bars, this partially works.
However, whenever I try to specify min and or max values, excelize does not appear to be converting the numeric values correctly.
Steps to reproduce the issue:
- Create a column if increasing numbers, 1-100.
- Use the following code to conditionally format the cells:
err = ss.Excelize.SetConditionalFormat(sheetName, fmt.Sprintf("$AL$%d:$AL$%d", startRow, nodeRow-1),
[]excelize.ConditionalFormatOptions{
{
Type: "data_bar",
Criteria: "=",
MinType: "num",
MinValue: "0",
MaxType: "num",
MaxValue: "100",
BarColor: "#FF0000,
},
},
) - Go into EXCEL, select the range and then the HOME tab, Conditional Formatting, Manage Rules, then edit rule.
Describe the results you received:
For me the max value shows up as zero.
Describe the results you expected:
I was expecting the max value to be 100.
If I tried using a cell reference, the formatting of the cell reference in EXCEL was wrong as well, it would contain extraneous quotation marks(").
Output of go version:
go version go1.20.2 windows/amd64
(paste your output here)
Excelize version or commit ID:
github.com/xuri/excelize/v2 v2.7.0 // indirect
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Windows 10
EXCEL 2013 part of the Microsoft Office 2013 bundle
