You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
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,
},
},
)
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
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
The text was updated successfully, but these errors were encountered: