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
548 / 5,000
Resultados de traducción
Traducción
I have the following code: // Add headers to the Excel file
headers := []string{"ID", "Status", "Product", "Cost", "# of people", "Order", "Start Date"}
// Set auto filter for the headers
err = xlsx.AutoFilter(sheetName, fmt.Sprintf("A1:%s1", columnIndexToAlpha(len(headers))), []excelize.AutoFilterOptions{
{Column: "B", Expression: "x = paid"},
})
if err != nil {
return err
}
which applied a filter in column B where = a paid, when the excel loads it looks like this (all the data without the filter)
I have to click on the filter (I see that the paid option is checked by default) and click on apply, if the filter works, am I doing something wrong? I appreciate your help
The text was updated successfully, but these errors were encountered:
Thanks for your issue. This library doesn't support filtering cell values when you add an auto filter. As the documentation says: It isn't sufficient to just specify the filter condition. You must also hide any rows that don't match the filter condition. Rows are hidden using the SetRowVisible function. Excelize can't filter rows automatically since this isn't part of the file format
548 / 5,000
Resultados de traducción
Traducción
I have the following code: // Add headers to the Excel file
headers := []string{"ID", "Status", "Product", "Cost", "# of people", "Order", "Start Date"}
// Set auto filter for the headers
err = xlsx.AutoFilter(sheetName, fmt.Sprintf("A1:%s1", columnIndexToAlpha(len(headers))), []excelize.AutoFilterOptions{
{Column: "B", Expression: "x = paid"},
})
if err != nil {
return err
}
which applied a filter in column B where = a paid, when the excel loads it looks like this (all the data without the filter)
I have to click on the filter (I see that the paid option is checked by default) and click on apply, if the filter works, am I doing something wrong? I appreciate your help
The text was updated successfully, but these errors were encountered: