The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 13:30 UTC
fix(server): keep boolean XLSX cells as true/false in extracted text (#35191)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Fuksss committed
Nov 14, 2026 at 19:14 UTC
889485c6fa9d6133b696e32080f078e5da4c78be
2 files changed
+14
apps/server/src/provider/documentTextWorker.ts
+2
@@ -561,6 +561,8 @@ async function* document(path: string, extension: string): AsyncGenerator<TextPa
561
const shared = strings[Number(raw)];
562
if (shared) yield* inCell(xstringText(shared));
563
} else if (cell.attrs.t === "inlineStr") yield* inCell(xstringText(cell));
564
+ else if (cell.attrs.t === "b" && (raw.trim() === "0" || raw.trim() === "1"))
565
+ yield* inCell([raw.trim() === "1" ? "true" : "false"]);
566
else {
567
if (value && hasCellText(value)) yield* inCell(xstringText(value));
568
else for (const formula of all(cell, "f")) yield* inCell(text(formula));
apps/server/src/provider/userInputAttachments.test.ts
+12
@@ -757,6 +757,18 @@ describe("question answer paths", () => {
757
],
758
absent: ["SUM(0,0)", "[Extracted text truncated"],
759
},
760
+ {
761
+ ext: "xlsx",
762
+ bounded: true,
763
+ parts: {
764
+ "xl/workbook.xml": '<workbook><sheet name="Flags" r:id="a"/></workbook>',
765
+ "xl/_rels/workbook.xml.rels":
766
+ '<Relationships><Relationship Id="a" Target="worksheets/a.xml"/></Relationships>',
767
+ "xl/worksheets/a.xml":
768
+ '<worksheet><row><c r="A1" t="b"><v>1</v></c><c r="B1" t="b"><v>0</v></c><c r="C1" t="n"><v>1</v></c><c r="D1" t="b"><v>2</v></c></row></worksheet>',
769
+ },
770
+ expected: ["true\tfalse\t1\t2"],
771
+ },
772
{
773
ext: "xlsx",
774
parts: {