AI coding workspace
Safe CSV exports
A CSV value may be interpreted differently by a spreadsheet. Gridberry provides a Windows project workspace for discussing export code, reviewing escaping changes and checking adversarial cells before sharing a file.
● ● ●Gridberry●
A concrete starting point · Safe CSV exports ×
function csvCell(value: string): string {
const guarded = /^(?:\s*[=+@-]|[\t\r\n])/.test(value) ? "'" + value : value;
return '"' + guarded.replaceAll('"', '""') + '"';
}✳Prepare CSV cells for spreadsheet import without allowing values to become formulas.
✓ ChangesReview before applying ↗
Illustrative workspace
Project
Check leading formula characters, tabs, commas and embedded quotes, while keeping the original application values unchanged.
Review before applying
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
Connection
Base URL, credentials and a reachable server.
A concrete starting point
function csvCell(value: string): string {
const guarded = /^(?:\s*[=+@-]|[\t\r\n])/.test(value) ? "'" + value : value;
return '"' + guarded.replaceAll('"', '""') + '"';
}