GGridberry
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
  1. Project

    Check leading formula characters, tabs, commas and embedded quotes, while keeping the original application values unchanged.

  2. Review before applying

    Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.

  3. Connection

    Base URL, credentials and a reachable server.

Workflows

Safe CSV exports

Workflows ↗
A concrete starting point
function csvCell(value: string): string {
  const guarded = /^(?:\s*[=+@-]|[\t\r\n])/.test(value) ? "'" + value : value;
  return '"' + guarded.replaceAll('"', '""') + '"';
}
AI coding workspace

Your next change starts here.

Get the Windows app ↗