Add bold cell formatting option
Some checks failed
Build and Deploy / build (push) Failing after 14s
Build and Deploy / deploy (push) Has been skipped

This commit is contained in:
Skylar Ittner 2026-02-05 01:10:10 -07:00
parent c677c7267b
commit 8b60ceb39c

View File

@ -10,7 +10,11 @@ const stylesXml = `<?xml version="1.0" encoding="UTF-8"?>
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
office:version="1.2">
<office:styles/>
<office:styles>
<style:style style:name="boldcell" style:family="table-cell">
<style:text-properties fo:font-weight="bold"/>
</style:style>
</office:styles>
<office:automatic-styles/>
<office:master-styles/>
</office:document-styles>`;
@ -101,6 +105,10 @@ function generateContentFileXMLString(sheetsData) {
const cellType = convertCellType(cell.type);
cellNode.setAttribute('office:value-type', cellType);
if (cell.style && cell.style == "bold") {
cellNode.setAttribute('table:style-name', "boldcell");
}
// Add value attribute based on type
if (cell.value !== null && cell.value !== undefined) {
switch (cellType) {