Answer
This typically happens when a WHERE clause wraps a context-substitution variable (like a date-token placeholder, or the equivalent Context_Substitution_Var_API.Get_Client_Value__ function call) inside an additional TO_DATE(...) conversion — since that function already returns a genuine DATE value, wrapping it in another TO_DATE() call is redundant and can produce this exact invalid-year error specifically under the Excel export/plugin execution path, even though the same redundant conversion happens to be tolerated when the report is just viewed directly in IFS. Remove the extra TO_DATE() wrapper so the already-DATE-typed context-substitution value is used directly in the comparison, rather than converting it a second time.