Skip to content

Commit

Permalink
Fix empty boolean type cells (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
minhdanh authored Jul 25, 2024
1 parent 17c35e8 commit cd926d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/save/save_file.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Save {
var attributes = <XmlAttribute>[
XmlAttribute(XmlName('r'), rC),
if (value is TextCellValue) XmlAttribute(XmlName('t'), 's'),
if (value is BoolCellValue) XmlAttribute(XmlName('t'), 'b'),
];

final cellStyle =
Expand Down Expand Up @@ -149,7 +150,9 @@ class Save {
]),
];
case BoolCellValue():
children = [];
children = [
XmlElement(XmlName('v'), [], [XmlText(value.value ? '1' : '0')]),
];
}

return XmlElement(XmlName('c'), attributes, children);
Expand Down

0 comments on commit cd926d4

Please sign in to comment.