diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index ea6e56c..d3b0914 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -3992,7 +3992,7 @@ chart_write_AREAFORMAT (XLChartWriteState *s, GOStyle const *style, gboolean dis
 			break;
 		}
 
-		if (style->fill.auto_type && style->fill.auto_fore && style->fill.auto_back && !disable_auto)
+		if (style->fill.auto_type && (style->fill.auto_fore || style->fill.auto_back) && !disable_auto)
 			flags |= 1;
 		if (style->fill.invert_if_negative)
 			flags |= 2;
@@ -4038,7 +4038,7 @@ chart_write_LINEFORMAT (XLChartWriteState *s, GOStyleLine const *lstyle,
 			w = 2;	/* wide */
 		/* seems that excel understand auto as solid, so if pattern is not solid
 		   do not set the auto flag, see #605043 */
-		flags |= (lstyle->auto_color && pat > 0)? 1: 0;
+		flags |= (lstyle->auto_color && pat == 0)? 1: 0;
 	} else {
 		color_index = chart_write_color (s, data, 0);
 		if (clear_lines_for_null) {
