-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetConditionalFormats do not return cell only Conditional Formating #1968
Comments
Thanks for your feedback. Could you show us a complete, standalone example program or reproducible demo? If you open an existing workbook, please provide the file attachment without confidential info. |
Hi there, while producing example, that really happen if delete a line in the code: package main
import "github.com/xuri/excelize/v2"
func main() {
exampleFile, err:=excelize.OpenFile(".../example.excelize.conditional.xlsx")
if err != nil {
panic(err)
}
sheetName:=exampleFile.GetSheetName(0)
println("before removing line")
conditionalFromats, err := exampleFile.GetConditionalFormats(sheetName)
if err != nil {
panic(err)
}
for rangeKey, conditionalFormat := range conditionalFromats {
println(rangeKey)
println(len(conditionalFormat))
}
exampleFile.RemoveRow(sheetName, 1)
println("after removing line")
conditionalFromats, err = exampleFile.GetConditionalFormats(sheetName)
if err != nil {
panic(err)
}
for rangeKey, conditionalFormat := range conditionalFromats {
println(rangeKey)
println(len(conditionalFormat))
}
} example file: I remove line Regards, |
Thanks for your issue. This issue has been fixed, please upgrade to the master branch code by |
- Fix missing conditional formatting after remove column - Fix the SetSheetVisible function panic on none views sheet - Updated unit tests
Description
GetConditionalFormats
do not return cell only Conditional FormatingIn this case only the first conditional Formating is return:
excelize/styles.go
Line 3200 in 688808b
Steps to reproduce the issue:
Describe the results you received:
no conditional format from
GetConditionalFormats
Describe the results you expected:
all the conditional format
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Linux,
LibreOffice
The text was updated successfully, but these errors were encountered: