FIX: There are two fills in every new Excel model

Excel expects two default fills. If a different fill is present Excel
removes it and substitutes it with the defaults.

This resulted in models having the default fill for the first style.

Thanks @scandel!
This commit is contained in:
Nicolás Hatcher
2025-06-05 06:28:39 +02:00
committed by Nicolás Hatcher Andrés
parent af49d7ad96
commit b9d3f5329b
2 changed files with 22 additions and 1 deletions

View File

@@ -303,7 +303,14 @@ impl Default for Styles {
Styles {
num_fmts: vec![],
fonts: vec![Default::default()],
fills: vec![Default::default()],
fills: vec![
Default::default(),
Fill {
pattern_type: "gray125".to_string(),
fg_color: None,
bg_color: None,
},
],
borders: vec![Default::default()],
cell_style_xfs: vec![Default::default()],
cell_xfs: vec![Default::default()],