Skip to content

feat: R1C1 notation, inline strings, CSV hardening, VBA injection#169

Merged
productdevbook merged 1 commit intomainfrom
feat/quick-wins
Apr 4, 2026
Merged

feat: R1C1 notation, inline strings, CSV hardening, VBA injection#169
productdevbook merged 1 commit intomainfrom
feat/quick-wins

Conversation

@productdevbook
Copy link
Copy Markdown
Owner

Summary

Examples

// R1C1 → A1
r1c1ToA1("R[1]C[-1]", 4, 4)  // → "D6"
a1ToR1C1("D6", 4, 4)          // → "R[1]C[-1]"

// Inline strings (faster write)
await writeXlsx({ sheets: [...], stringMode: "inline" })

// CSV injection protection
writeCsv([["=cmd|'/C calc'"]], { escapeFormulae: true })
// → "'=cmd|'/C calc'"

// VBA injection
await writeXlsx({ sheets: [...], vbaProject: vbaProjectBin })

Test plan

  • 2106 tests pass (19 new)
  • TypeScript typecheck clean
  • Lint + format clean

Closes #162, #166, #164, #160

🤖 Generated with Claude Code

- R1C1 notation: r1c1ToA1() and a1ToR1C1() formula converters for
  programmatic formula generation (#162)
- Inline string mode: stringMode option on WriteOptions — skip SST
  for faster writes with unique strings (#166)
- CSV injection hardening: expanded FORMULA_PREFIXES with \n, \0, |
  and added DANGEROUS_PATTERNS for DDE/HYPERLINK detection (#164)
- VBA/macro injection: vbaProject option on WriteOptions to embed
  vbaProject.bin and output macro-enabled format (#160)

19 new tests, 2106 total passing.

Closes #162, closes #166, closes #164, closes #160

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@productdevbook productdevbook merged commit b9f835f into main Apr 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: R1C1 notation support for formulas

1 participant