Repository navigation
A1JS is a modern TypeScript library for manipulating JavaScript tables using spreadsheet-style cell references (A1, B2, CZ10, etc.) with full CSV import/export capabilities.
β¨ Key Features
π Spreadsheet-Style References
- Use familiar cell references:
A1,B2,CZ10, etc. - Support for large column ranges (A-Z, AA-ZZ, AAA-ZZZ)
- Intuitive spreadsheet-like data manipulation
π Bidirectional CSV Support
- Export:
table.toCSVString()with customizable options - Import:
A1.fromCSVString()for creating tables from CSV - Load:
table.loadFromCSVString()for updating existing tables - Perfect round-trip data preservation
π― Modern TypeScript
- ESM-only for modern JavaScript environments
- Full TypeScript support with strict typing
- Comprehensive type definitions included
π Multiple Data Access Methods
getAllData()- Safe copy of all datagetRawData()- Direct reference for performancetoArray()- 2D array representationtoCompactArray()- Non-empty cells onlytoRowBasedArray()- Structured row data
π¦ Installation
npm install a1jsπ§ Quick Start
import { A1 } from "a1js";
// Create table with cell references
const table = new A1({
A1: "Product",
B1: "Price",
A2: "Apple",
B2: 1.5,
});
// Export to CSV
const csv = table.toCSVString();
// Import from CSV
const restored = A1.fromCSVString(csv);π§ͺ Quality Assurance
- β 80 unit tests with full coverage
- β Automated CI/CD with GitHub Actions
- β ESM-only modern JavaScript
- β TypeScript strict mode
- β Comprehensive documentation
π Documentation
Ready to manipulate your data like in a spreadsheet! π